linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libperf: fix build error with LIBPFM4=1
@ 2021-07-13  9:19 Heiko Carstens
  2021-07-13  9:32 ` Jiri Olsa
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Carstens @ 2021-07-13  9:19 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: linux-perf-users, linux-kernel

Fix build error with LIBPFM4=1:
  CC      util/pfm.o
util/pfm.c: In function ‘parse_libpfm_events_option’:
util/pfm.c:102:30: error: ‘struct evsel’ has no member named ‘leader’
  102 |                         evsel->leader = grp_leader;
      |                              ^~

Fixes: fba7c86601e2 ("libperf: Move 'leader' from tools/perf to perf_evsel::leader")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
 tools/perf/util/pfm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c
index dd9ed56e0504..756295dedccc 100644
--- a/tools/perf/util/pfm.c
+++ b/tools/perf/util/pfm.c
@@ -99,7 +99,7 @@ int parse_libpfm_events_option(const struct option *opt, const char *str,
 			grp_leader = evsel;
 
 		if (grp_evt > -1) {
-			evsel->leader = grp_leader;
+			evsel__set_leader(evsel, grp_leader);
 			grp_leader->core.nr_members++;
 			grp_evt++;
 		}
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libperf: fix build error with LIBPFM4=1
  2021-07-13  9:19 [PATCH] libperf: fix build error with LIBPFM4=1 Heiko Carstens
@ 2021-07-13  9:32 ` Jiri Olsa
  2021-07-13 18:54   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2021-07-13  9:32 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	linux-perf-users, linux-kernel

On Tue, Jul 13, 2021 at 11:19:07AM +0200, Heiko Carstens wrote:
> Fix build error with LIBPFM4=1:
>   CC      util/pfm.o
> util/pfm.c: In function ‘parse_libpfm_events_option’:
> util/pfm.c:102:30: error: ‘struct evsel’ has no member named ‘leader’
>   102 |                         evsel->leader = grp_leader;
>       |                              ^~
> 
> Fixes: fba7c86601e2 ("libperf: Move 'leader' from tools/perf to perf_evsel::leader")
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> ---
>  tools/perf/util/pfm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c
> index dd9ed56e0504..756295dedccc 100644
> --- a/tools/perf/util/pfm.c
> +++ b/tools/perf/util/pfm.c
> @@ -99,7 +99,7 @@ int parse_libpfm_events_option(const struct option *opt, const char *str,
>  			grp_leader = evsel;
>  
>  		if (grp_evt > -1) {
> -			evsel->leader = grp_leader;
> +			evsel__set_leader(evsel, grp_leader);
>  			grp_leader->core.nr_members++;
>  			grp_evt++;
>  		}
> -- 
> 2.25.1
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libperf: fix build error with LIBPFM4=1
  2021-07-13  9:32 ` Jiri Olsa
@ 2021-07-13 18:54   ` Arnaldo Carvalho de Melo
  2021-07-13 18:59     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-07-13 18:54 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Heiko Carstens, Peter Zijlstra, Ingo Molnar, linux-perf-users,
	linux-kernel

Em Tue, Jul 13, 2021 at 11:32:14AM +0200, Jiri Olsa escreveu:
> On Tue, Jul 13, 2021 at 11:19:07AM +0200, Heiko Carstens wrote:
> > Fix build error with LIBPFM4=1:
> >   CC      util/pfm.o
> > util/pfm.c: In function ‘parse_libpfm_events_option’:
> > util/pfm.c:102:30: error: ‘struct evsel’ has no member named ‘leader’
> >   102 |                         evsel->leader = grp_leader;
> >       |                              ^~
> > 
> > Fixes: fba7c86601e2 ("libperf: Move 'leader' from tools/perf to perf_evsel::leader")
> > Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> 
> Acked-by: Jiri Olsa <jolsa@redhat.com>

Argh, we have this in 'make -C tools/perf build-test'

⬢[acme@toolbox perf]$ grep libpfm tools/perf/tests/make
make_with_libpfm4   := LIBPFM4=1
run += make_with_libpfm4
⬢[acme@toolbox perf]$

But I forgot to install libpfm-devel :-\

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libperf: fix build error with LIBPFM4=1
  2021-07-13 18:54   ` Arnaldo Carvalho de Melo
@ 2021-07-13 18:59     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-07-13 18:59 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Heiko Carstens, Peter Zijlstra, Ingo Molnar, linux-perf-users,
	linux-kernel

Em Tue, Jul 13, 2021 at 03:54:09PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Jul 13, 2021 at 11:32:14AM +0200, Jiri Olsa escreveu:
> > On Tue, Jul 13, 2021 at 11:19:07AM +0200, Heiko Carstens wrote:
> > > Fix build error with LIBPFM4=1:
> > >   CC      util/pfm.o
> > > util/pfm.c: In function ‘parse_libpfm_events_option’:
> > > util/pfm.c:102:30: error: ‘struct evsel’ has no member named ‘leader’
> > >   102 |                         evsel->leader = grp_leader;
> > >       |                              ^~
> > > 
> > > Fixes: fba7c86601e2 ("libperf: Move 'leader' from tools/perf to perf_evsel::leader")
> > > Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> > 
> > Acked-by: Jiri Olsa <jolsa@redhat.com>
> 
> Argh, we have this in 'make -C tools/perf build-test'
> 
> ⬢[acme@toolbox perf]$ grep libpfm tools/perf/tests/make
> make_with_libpfm4   := LIBPFM4=1
> run += make_with_libpfm4
> ⬢[acme@toolbox perf]$
> 
> But I forgot to install libpfm-devel :-\
> 
> Thanks, applied.

Before applying this patch and after installing libpfm-devel:

⬢[acme@toolbox perf]$ time make -C tools/perf build-test
make: Entering directory '/var/home/acme/git/perf/tools/perf'
- tarpkg: ./tests/perf-targz-src-pkg .
                 make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 -j24  DESTDIR=/tmp/tmp.Yh1LFyzmRo
              make_with_gtk2: cd . && make GTK2=1 -j24  DESTDIR=/tmp/tmp.cXprMRo2l
 <SNIP>
         make_no_libcrypto_O: cd . && make NO_LIBCRYPTO=1 FEATURES_DUMP=/var/home/acme/git/perf/tools/perf/BUILD_TEST_FEATURE_DUMP -j24 O=/tmp/tmp.e04E4H4uiD DESTDIR=/tmp/tmp.iiT6ClgH6T
                make_debug_O: cd . && make DEBUG=1 FEATURES_DUMP=/var/home/acme/git/perf/tools/perf/BUILD_TEST_FEATURE_DUMP -j24 O=/tmp/tmp.hkGg8pOdRg DESTDIR=/tmp/tmp.26JyYSi0Fi
               make_perf_o_O: cd . && make perf.o FEATURES_DUMP=/var/home/acme/git/perf/tools/perf/BUILD_TEST_FEATURE_DUMP -j24 O=/tmp/tmp.TF9ttNOenZ DESTDIR=/tmp/tmp.aaKrGlKAj8
         make_with_libpfm4_O: cd . && make LIBPFM4=1 FEATURES_DUMP=/var/home/acme/git/perf/tools/perf/BUILD_TEST_FEATURE_DUMP -j24 O=/tmp/tmp.R55G8uq67s DESTDIR=/tmp/tmp.dK1T5E9UNC
cd . && make LIBPFM4=1 FEATURES_DUMP=/var/home/acme/git/perf/tools/perf/BUILD_TEST_FEATURE_DUMP -j24 O=/tmp/tmp.R55G8uq67s DESTDIR=/tmp/tmp.dK1T5E9UNC
  BUILD:   Doing 'make -j24' parallel build
  HOSTCC  /tmp/tmp.R55G8uq67s/fixdep.o
  HOSTLD  /tmp/tmp.R55G8uq67s/fixdep-in.o
  LINK    /tmp/tmp.R55G8uq67s/fixdep
Makefile.config:1042: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel
  GEN     /tmp/tmp.R55G8uq67s/common-cmds.h
  CC      /tmp/tmp.R55G8uq67s/exec-cmd.o
  CC      /tmp/tmp.R55G8uq67s/help.o
  CC      /tmp/tmp.R55G8uq67s/pager.o
  PERF_VERSION = 5.14.rc1.g80343ca0f906
  CC      /tmp/tmp.R55G8uq67s/cpu.o
  MKDIR   /tmp/tmp.R55G8uq67s/fd/
  MKDIR   /tmp/tmp.R55G8uq67s/pmu-events/
  MKDIR   /tmp/tmp.R55G8uq67s/fs/
  MKDIR   /tmp/tmp.R55G8uq67s/fs/
  CC      /tmp/tmp.R55G8uq67s/debug.o
  CC      /tmp/tmp.R55G8uq67s/parse-options.o
 <SNIP>
  CC      /tmp/tmp.R55G8uq67s/util/perf-hooks.o
  CC      /tmp/tmp.R55G8uq67s/util/bpf-event.o
  CC      /tmp/tmp.R55G8uq67s/util/pfm.o
  FLEX    /tmp/tmp.R55G8uq67s/util/parse-events-flex.c
  FLEX    /tmp/tmp.R55G8uq67s/util/pmu-flex.c
  CC      /tmp/tmp.R55G8uq67s/util/pmu-bison.o
  FLEX    /tmp/tmp.R55G8uq67s/util/expr-flex.c
  CC      /tmp/tmp.R55G8uq67s/util/expr-bison.o
  CC      /tmp/tmp.R55G8uq67s/util/parse-events.o
  CC      /tmp/tmp.R55G8uq67s/util/parse-events-flex.o
  CC      /tmp/tmp.R55G8uq67s/util/pmu.o
  CC      /tmp/tmp.R55G8uq67s/util/pmu-flex.o
  CC      /tmp/tmp.R55G8uq67s/util/expr-flex.o
  CC      /tmp/tmp.R55G8uq67s/util/expr.o
util/pfm.c: In function ‘parse_libpfm_events_option’:
util/pfm.c:102:30: error: ‘struct evsel’ has no member named ‘leader’
  102 |                         evsel->leader = grp_leader;
      |                              ^~
make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/tmp.R55G8uq67s/util/pfm.o] Error 1
make[6]: *** Waiting for unfinished jobs....
  LD      /tmp/tmp.R55G8uq67s/util/scripting-engines/perf-in.o
  LD      /tmp/tmp.R55G8uq67s/util/intel-pt-decoder/perf-in.o
make[5]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
make[4]: *** [Makefile.perf:655: /tmp/tmp.R55G8uq67s/perf-in.o] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile.perf:238: sub-make] Error 2
make[2]: *** [Makefile:70: all] Error 2
make[1]: *** [tests/make:337: make_with_libpfm4_O] Error 1
make: *** [Makefile:103: build-test] Error 2
make: Leaving directory '/var/home/acme/git/perf/tools/perf'

real	4m55.864s
user	52m55.075s
sys	11m27.592s
⬢[acme@toolbox perf]$ rpm -q libpfm-devel
libpfm-devel-4.11.0-4.fc34.x86_64
⬢[acme@toolbox perf]$

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-13 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13  9:19 [PATCH] libperf: fix build error with LIBPFM4=1 Heiko Carstens
2021-07-13  9:32 ` Jiri Olsa
2021-07-13 18:54   ` Arnaldo Carvalho de Melo
2021-07-13 18:59     ` Arnaldo Carvalho de Melo

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).