2024-02-06 23:59:18

by Ian Rogers

[permalink] [raw]
Subject: [PATCH v1] perf kvm powerpc: Fix build

Updates to struct parse_events_error needed to be carried through to
PowerPC specific event parsing.

Reported-by: Stephen Rothwell <[email protected]>
Fixes: fd7b8e8fb20f ("perf parse-events: Print all errors")
Signed-off-by: Ian Rogers <[email protected]>
---
tools/perf/arch/powerpc/util/kvm-stat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/perf/arch/powerpc/util/kvm-stat.c
index d9a0ac1cdf30..c8357b571ccf 100644
--- a/tools/perf/arch/powerpc/util/kvm-stat.c
+++ b/tools/perf/arch/powerpc/util/kvm-stat.c
@@ -114,7 +114,7 @@ static int is_tracepoint_available(const char *str, struct evlist *evlist)

parse_events_error__init(&err);
ret = parse_events(evlist, str, &err);
- if (err.str)
+ if (ret)
parse_events_error__print(&err, "tracepoint");
parse_events_error__exit(&err);
return ret;
--
2.43.0.594.gd9cf4e227d-goog



2024-02-07 00:01:50

by Namhyung Kim

[permalink] [raw]
Subject: Re: [PATCH v1] perf kvm powerpc: Fix build

On Tue, Feb 6, 2024 at 3:59 PM Ian Rogers <[email protected]> wrote:
>
> Updates to struct parse_events_error needed to be carried through to
> PowerPC specific event parsing.
>
> Reported-by: Stephen Rothwell <[email protected]>
> Fixes: fd7b8e8fb20f ("perf parse-events: Print all errors")
> Signed-off-by: Ian Rogers <[email protected]>

Acked-by: Namhyung <[email protected]>

Thanks for the quick fix!
Namhyung


> ---
> tools/perf/arch/powerpc/util/kvm-stat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/perf/arch/powerpc/util/kvm-stat.c
> index d9a0ac1cdf30..c8357b571ccf 100644
> --- a/tools/perf/arch/powerpc/util/kvm-stat.c
> +++ b/tools/perf/arch/powerpc/util/kvm-stat.c
> @@ -114,7 +114,7 @@ static int is_tracepoint_available(const char *str, struct evlist *evlist)
>
> parse_events_error__init(&err);
> ret = parse_events(evlist, str, &err);
> - if (err.str)
> + if (ret)
> parse_events_error__print(&err, "tracepoint");
> parse_events_error__exit(&err);
> return ret;
> --
> 2.43.0.594.gd9cf4e227d-goog
>

2024-02-07 22:12:38

by Namhyung Kim

[permalink] [raw]
Subject: Re: [PATCH v1] perf kvm powerpc: Fix build

On Tue, 6 Feb 2024 15:59:02 -0800, Ian Rogers wrote:
> Updates to struct parse_events_error needed to be carried through to
> PowerPC specific event parsing.
>
>

Applied to perf-tools-next, thanks!

Best regards,
--
Namhyung Kim <[email protected]>