[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c19ca2a2-54c9-88b1-b705-5a2cd4dd9580@kernel.org>
Date: Mon, 3 Jan 2022 09:25:26 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: Ian Rogers <irogers@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-trace-devel@...r.kernel.org,
Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>
Cc: eranian@...gle.com
Subject: [was: libtraceevent: Increase libtraceevent logging when verbose]
Ping -- perf build is still broken in 5.16-rc8 due to this.
On 16. 12. 21, 9:07, Jiri Slaby wrote:
> Hi,
>
> On 23. 09. 21, 2:10, Ian Rogers wrote:
>> libtraceevent has added more levels of debug printout and with changes
>> like:
>> https://lore.kernel.org/linux-trace-devel/20210507095022.1079364-3-tz.stoyanov@gmail.com
>>
>> previously generated output like "registering plugin" is no longer
>> displayed. This change makes it so that if perf's verbose debug output
>> is enabled then the debug and info libtraceevent messages can be
>> displayed.
>> The code is conditionally enabled based on the libtraceevent version as
>> discussed in the RFC:
>> https://lore.kernel.org/lkml/20210610060643.595673-1-irogers@google.com/
>>
>> v2. Is a rebase and handles the case of building without
>> LIBTRACEEVENT_DYNAMIC.
>
> 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
> ...
>
> So:
>
>
>> --- a/tools/perf/util/debug.c
>> +++ b/tools/perf/util/debug.c
>> @@ -24,6 +24,16 @@
>> #include "util/parse-sublevel-options.h"
>> #include <linux/ctype.h>
>> +#include <traceevent/event-parse.h>
>
> /home/abuild/rpmbuild/BUILD/tools/lib/traceevent/event-parse.h is taken
> here.
>
>> @@ -228,6 +238,15 @@ int perf_debug_option(const char *str)
>> /* Allow only verbose value in range (0, 10), otherwise set 0. */
>> verbose = (verbose < 0) || (verbose > 10) ? 0 : verbose;
>> +#if MAKE_LIBTRACEEVENT_VERSION(1, 3, 0) <= LIBTRACEEVENT_VERSION
>
> But
> -DLIBTRACEEVENT_VERSION=65790
> is taken here (which is 1.3.0).
>
>> + if (verbose == 1)
>> + tep_set_loglevel(TEP_LOG_INFO);
>> + else if (verbose == 2)
>> + tep_set_loglevel(TEP_LOG_DEBUG);
>> + else if (verbose >= 3)
>> + tep_set_loglevel(TEP_LOG_ALL);
>> +#endif
>> +
>> return 0;
>> }
>
> regards,
--
js
suse labs
Powered by blists - more mailing lists