Commit 25912eca authored by Adrian Hunter's avatar Adrian Hunter Committed by Junhao He
Browse files

libperf evlist: Remove ->idx() per_cpu parameter

mainline inclusion
from mainline-v5.19-rc1
commit 6a7b8a5a
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7HI80
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6a7b8a5a30e60e27cd2489af3d0a441280b441e6



--------------------------------

Remove ->idx() per_cpu parameter because it isn't needed.

Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Acked-by: default avatarIan 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-7-adrian.hunter@intel.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarJunhao He <hejunhao3@huawei.com>
parent 82c66282
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -511,7 +511,7 @@ mmap_per_thread(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
		int output_overwrite = -1;

		if (ops->idx)
			ops->idx(evlist, mp, thread, false);
			ops->idx(evlist, mp, thread);

		if (mmap_per_evsel(evlist, ops, thread, mp, 0, thread,
				   &output, &output_overwrite))
@@ -538,7 +538,7 @@ mmap_per_cpu(struct perf_evlist *evlist, struct perf_evlist_mmap_ops *ops,
		int output_overwrite = -1;

		if (ops->idx)
			ops->idx(evlist, mp, cpu, true);
			ops->idx(evlist, mp, cpu);

		for (thread = 0; thread < nr_threads; thread++) {
			if (mmap_per_evsel(evlist, ops, cpu, mp, cpu,
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ struct perf_evlist {
};

typedef void
(*perf_evlist_mmap__cb_idx_t)(struct perf_evlist*, struct perf_mmap_param*, int, bool);
(*perf_evlist_mmap__cb_idx_t)(struct perf_evlist*, struct perf_mmap_param*, int);
typedef struct perf_mmap*
(*perf_evlist_mmap__cb_get_t)(struct perf_evlist*, bool, int);
typedef int
+2 −1
Original line number Diff line number Diff line
@@ -722,10 +722,11 @@ static struct mmap *evlist__alloc_mmap(struct evlist *evlist,
static void
perf_evlist__mmap_cb_idx(struct perf_evlist *_evlist,
			 struct perf_mmap_param *_mp,
			 int idx, bool per_cpu)
			 int idx)
{
	struct evlist *evlist = container_of(_evlist, struct evlist, core);
	struct mmap_params *mp = container_of(_mp, struct mmap_params, core);
	bool per_cpu = !perf_cpu_map__empty(_evlist->cpus);

	auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, idx, per_cpu);
}