[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fXd_J29XZchia52Bxch3h0Tz0k37DOemLLYdK7u8LBADw@mail.gmail.com>
Date: Fri, 8 Nov 2024 18:27:39 -0800
From: Ian Rogers <irogers@...gle.com>
To: Jean-Philippe Romain <jean-philippe.romain@...s.st.com>
Cc: Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, Liang Kan <kan.liang@...ux.intel.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
fabrice.gasnier@...s.st.com, alexandre.torgue@...s.st.com
Subject: Re: [PATCH] perf list: fix arguments order issue for events printing
On Fri, Nov 8, 2024 at 12:31 AM Jean-Philippe Romain
<jean-philippe.romain@...s.st.com> wrote:
>
> Misalignment of callbacks with print_event:
> - pmu_name and topic arguments to reverse
>
> Signed-off-by: Jean-Philippe ROMAIN <jean-philippe.romain@...s.st.com>
>
> diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
> index 65b8cba324be..c5331721dfee 100644
> --- a/tools/perf/builtin-list.c
> +++ b/tools/perf/builtin-list.c
> @@ -112,7 +112,7 @@ static void wordwrap(FILE *fp, const char *s, int start, int max, int corr)
> }
> }
>
> -static void default_print_event(void *ps, const char *pmu_name, const char *topic,
> +static void default_print_event(void *ps, const char *topic, const char *pmu_name,
So it looks like the call sites are doing this wrong too:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/pmus.c?h=perf-tools-next#n504
```
...
print_cb->print_event(print_state,
aliases[j].pmu_name,
aliases[j].topic,
...
```
I'll review the call-sites and send a bigger change.
Thanks,
Ian
Powered by blists - more mailing lists