Skip to content

Commit dc9f2dd

Browse files
committed
Revert "libtraceevent: Increase libtraceevent logging when verbose"
This reverts commit 08efcb4. This breaks the build as it will prefer using libbpf-devel header files, even when not using LIBBPF_DYNAMIC=1, breaking the build. This was detected on OpenSuSE Tumbleweed with libtraceevent-devel 1.3.0, as described by Jiri Slaby: ======================================================================= It breaks build with LIBTRACEEVENT_DYNAMIC and version 1.3.0: > util/debug.c: In function ‘perf_debug_option’: > util/debug.c:243:17: error: implicit declaration of function ‘tep_set_loglevel’ [-Werror=implicit-function-declaration] > 243 | tep_set_loglevel(TEP_LOG_INFO); > | ^~~~~~~~~~~~~~~~ > util/debug.c:243:34: error: ‘TEP_LOG_INFO’ undeclared (first use in this function); did you mean ‘TEP_PRINT_INFO’? > 243 | tep_set_loglevel(TEP_LOG_INFO); > | ^~~~~~~~~~~~ > | TEP_PRINT_INFO > util/debug.c:243:34: note: each undeclared identifier is reported only once for each function it appears in > util/debug.c:245:34: error: ‘TEP_LOG_DEBUG’ undeclared (first use in this function) > 245 | tep_set_loglevel(TEP_LOG_DEBUG); > | ^~~~~~~~~~~~~ > util/debug.c:247:34: error: ‘TEP_LOG_ALL’ undeclared (first use in this function) > 247 | tep_set_loglevel(TEP_LOG_ALL); > | ^~~~~~~~~~~ It is because the gcc's command line looks like: gcc ... -I/home/abuild/rpmbuild/BUILD/tools/lib/ ... -DLIBTRACEEVENT_VERSION=65790 ... ======================================================================= The proper way to fix this is more involved and so not suitable for this late in the 5.16-rc stage. Reported-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Cc: Andrii Nakryiko <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Song Liu <[email protected]> Cc: Steven Rostedt <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent f06a82f commit dc9f2dd

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

tools/perf/util/debug.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@
2424
#include "util/parse-sublevel-options.h"
2525

2626
#include <linux/ctype.h>
27-
#include <traceevent/event-parse.h>
28-
29-
#define MAKE_LIBTRACEEVENT_VERSION(a, b, c) ((a)*255*255+(b)*255+(c))
30-
#ifndef LIBTRACEEVENT_VERSION
31-
/*
32-
* If LIBTRACEEVENT_VERSION wasn't computed then set to version 1.1.0 that ships
33-
* with the Linux kernel tools.
34-
*/
35-
#define LIBTRACEEVENT_VERSION MAKE_LIBTRACEEVENT_VERSION(1, 1, 0)
36-
#endif
3727

3828
int verbose;
3929
int debug_peo_args;
@@ -238,15 +228,6 @@ int perf_debug_option(const char *str)
238228
/* Allow only verbose value in range (0, 10), otherwise set 0. */
239229
verbose = (verbose < 0) || (verbose > 10) ? 0 : verbose;
240230

241-
#if MAKE_LIBTRACEEVENT_VERSION(1, 3, 0) <= LIBTRACEEVENT_VERSION
242-
if (verbose == 1)
243-
tep_set_loglevel(TEP_LOG_INFO);
244-
else if (verbose == 2)
245-
tep_set_loglevel(TEP_LOG_DEBUG);
246-
else if (verbose >= 3)
247-
tep_set_loglevel(TEP_LOG_ALL);
248-
#endif
249-
250231
return 0;
251232
}
252233

0 commit comments

Comments
 (0)