From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-trace-devel@vger.kernel.org,
Tzvetomir Stoyanov <tz.stoyanov@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
eranian@google.com
Subject: Re: [was: libtraceevent: Increase libtraceevent logging when verbose]
Date: Mon, 3 Jan 2022 12:15:46 -0300 [thread overview]
Message-ID: <YdMTIl7jn25XrUn8@kernel.org> (raw)
In-Reply-To: <c19ca2a2-54c9-88b1-b705-5a2cd4dd9580@kernel.org>
Em Mon, Jan 03, 2022 at 09:25:26AM +0100, Jiri Slaby escreveu:
> 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;
> > > }
Tried reproducing here on fedora 34 but it is at 1.1.1:
make: Leaving directory '/var/home/acme/git/perf/tools/perf'
Performance counter stats for 'make -k LIBTRACEEVENT_DYNAMIC=1 BUILD_BPF_SKEL=1 CORESIGHT=1 PYTHON=python3 O=/tmp/build/perf -C tools/perf install-bin':
397,176,418,790 cycles:u
493,885,896,752 instructions:u # 1.24 insn per cycle
8.664957770 seconds time elapsed
97.706894000 seconds user
23.714293000 seconds sys
On branch perf/urgent
Your branch is ahead of 'quaco/perf/urgent' by 369 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
19: 'import perf' in python : Ok
⬢[acme@toolbox perf]$ git diff
⬢[acme@toolbox perf]$ rpm -q libtraceevent-devel
libtraceevent-devel-1.1.1-2.fc34.x86_64
Lemme see in a container so that I can also test the fix.
- Arnaldo
next prev parent reply other threads:[~2022-01-03 15:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 0:10 [PATCH v3 1/4] perf: Enable libtracefs dynamic linking Ian Rogers
2021-09-23 0:10 ` [PATCH v3 2/4] perf: Add define for libtraceevent version Ian Rogers
2021-09-23 0:10 ` [PATCH v3 3/4] perf: Add define for libtracefs version Ian Rogers
2021-09-23 0:10 ` [PATCH v3 4/4] libtraceevent: Increase libtraceevent logging when verbose Ian Rogers
2021-12-16 8:07 ` Jiri Slaby
2022-01-03 8:25 ` [was: libtraceevent: Increase libtraceevent logging when verbose] Jiri Slaby
2022-01-03 15:04 ` Arnaldo Carvalho de Melo
2022-01-03 15:07 ` Steven Rostedt
2022-01-03 15:15 ` Arnaldo Carvalho de Melo [this message]
2022-01-04 6:17 ` Jiri Slaby
2022-01-06 7:01 ` Ian Rogers
2021-09-28 19:01 ` [PATCH v3 1/4] perf: Enable libtracefs dynamic linking Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YdMTIl7jn25XrUn8@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=jirislaby@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=tz.stoyanov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).