linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tools: Fix build with libpfm
@ 2021-07-12 23:49 Namhyung Kim
  2021-07-13 20:11 ` Ian Rogers
  0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2021-07-12 23:49 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ingo Molnar, Peter Zijlstra, LKML, Andi Kleen, Ian Rogers

It missed to update the parse_libpfm_events_option() to use a new
helper function to set the event group leader.

  $ make LIBPFM4=1
  ...
    CC      util/pfm.o
  util/pfm.c: In function ‘parse_libpfm_events_option’:
  util/pfm.c:103:9: error: ‘struct evsel’ has no member named ‘leader’
    103 |    evsel->leader = grp_leader;
        |         ^~
  make[4]: *** [tools/build/Makefile.build:96: util/pfm.o] Error 1

Fixes: fba7c86601e2 ("libperf: Move 'leader' from tools/perf to perf_evsel::leader")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 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.32.0.93.g670b81a890-goog


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

* Re: [PATCH] perf tools: Fix build with libpfm
  2021-07-12 23:49 [PATCH] perf tools: Fix build with libpfm Namhyung Kim
@ 2021-07-13 20:11 ` Ian Rogers
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Rogers @ 2021-07-13 20:11 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Ingo Molnar, Peter Zijlstra,
	LKML, Andi Kleen

On Mon, Jul 12, 2021 at 4:49 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> It missed to update the parse_libpfm_events_option() to use a new
> helper function to set the event group leader.
>
>   $ make LIBPFM4=1
>   ...
>     CC      util/pfm.o
>   util/pfm.c: In function ‘parse_libpfm_events_option’:
>   util/pfm.c:103:9: error: ‘struct evsel’ has no member named ‘leader’
>     103 |    evsel->leader = grp_leader;
>         |         ^~
>   make[4]: *** [tools/build/Makefile.build:96: util/pfm.o] Error 1
>
> Fixes: fba7c86601e2 ("libperf: Move 'leader' from tools/perf to perf_evsel::leader")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  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.32.0.93.g670b81a890-goog
>

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 23:49 [PATCH] perf tools: Fix build with libpfm Namhyung Kim
2021-07-13 20:11 ` Ian Rogers

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