[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YnqgSll+nubb3/BD@kernel.org>
Date: Tue, 10 May 2022 14:26:34 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jiri Olsa <jolsa@...hat.com>, Ian Rogers <irogers@...gle.com>,
Alexey Bayduraev <alexey.v.bayduraev@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Leo Yan <leo.yan@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 07/23] libperf evlist: Move ->idx() into
mmap_per_evsel()
Em Fri, May 06, 2022 at 03:25:45PM +0300, Adrian Hunter escreveu:
> Move ->idx() into mmap_per_evsel() in preparation for adding evsel as a
> parameter.
>
> Acked-by: Ian Rogers <irogers@...gle.com>
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
Thanks, applied.
- Arnaldo
> ---
> tools/lib/perf/evlist.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
> index 5e8ad854fa8a..4fce417432aa 100644
> --- a/tools/lib/perf/evlist.c
> +++ b/tools/lib/perf/evlist.c
> @@ -478,6 +478,9 @@ mmap_per_evsel(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
> */
> refcount_set(&map->refcnt, 2);
>
> + if (ops->idx)
> + ops->idx(evlist, mp, idx);
> +
> if (ops->mmap(map, mp, *output, evlist_cpu) < 0)
> return -1;
>
> @@ -520,9 +523,6 @@ mmap_per_thread(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
> int output = -1;
> int output_overwrite = -1;
>
> - if (ops->idx)
> - ops->idx(evlist, mp, thread);
> -
> if (mmap_per_evsel(evlist, ops, thread, mp, 0, thread,
> &output, &output_overwrite))
> goto out_unmap;
> @@ -547,9 +547,6 @@ mmap_per_cpu(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
> int output = -1;
> int output_overwrite = -1;
>
> - if (ops->idx)
> - ops->idx(evlist, mp, cpu);
> -
> for (thread = 0; thread < nr_threads; thread++) {
> if (mmap_per_evsel(evlist, ops, cpu, mp, cpu,
> thread, &output, &output_overwrite))
> --
> 2.25.1
--
- Arnaldo
Powered by blists - more mailing lists