提交 d8fe2efb 编写于 作者: A Adrian Hunter 提交者: Arnaldo Carvalho de Melo

libperf evlist: Move ->idx() into mmap_per_evsel()

Move ->idx() into mmap_per_evsel() in preparation for adding evsel as a
parameter.
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Acked-by: NIan Rogers <irogers@google.com>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20220506122601.367589-8-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 6a7b8a5a
...@@ -478,6 +478,9 @@ mmap_per_evsel(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops, ...@@ -478,6 +478,9 @@ mmap_per_evsel(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
*/ */
refcount_set(&map->refcnt, 2); refcount_set(&map->refcnt, 2);
if (ops->idx)
ops->idx(evlist, mp, idx);
if (ops->mmap(map, mp, *output, evlist_cpu) < 0) if (ops->mmap(map, mp, *output, evlist_cpu) < 0)
return -1; return -1;
...@@ -520,9 +523,6 @@ mmap_per_thread(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops, ...@@ -520,9 +523,6 @@ mmap_per_thread(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
int output = -1; int output = -1;
int output_overwrite = -1; int output_overwrite = -1;
if (ops->idx)
ops->idx(evlist, mp, thread);
if (mmap_per_evsel(evlist, ops, thread, mp, 0, thread, if (mmap_per_evsel(evlist, ops, thread, mp, 0, thread,
&output, &output_overwrite)) &output, &output_overwrite))
goto out_unmap; goto out_unmap;
...@@ -547,9 +547,6 @@ mmap_per_cpu(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops, ...@@ -547,9 +547,6 @@ mmap_per_cpu(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
int output = -1; int output = -1;
int output_overwrite = -1; int output_overwrite = -1;
if (ops->idx)
ops->idx(evlist, mp, cpu);
for (thread = 0; thread < nr_threads; thread++) { for (thread = 0; thread < nr_threads; thread++) {
if (mmap_per_evsel(evlist, ops, cpu, mp, cpu, if (mmap_per_evsel(evlist, ops, cpu, mp, cpu,
thread, &output, &output_overwrite)) thread, &output, &output_overwrite))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册