The patches stop attempts to auxtrace mmap when it is not an auxtrace event e.g. when mmapping the CPUs on which only sideband is captured
Adrian Hunter (6): libperf evlist: Remove ->idx() per_cpu parameter libperf evlist: Move ->idx() into mmap_per_evsel() libperf evlist: Add evsel as a parameter to ->idx() perf auxtrace: Record whether an auxtrace mmap is needed perf auxtrace: Add mmap_needed to auxtrace_mmap_params perf auxtrace: Remove auxtrace_mmap_params__set_idx() per_cpu parameter
tools/lib/perf/evlist.c | 9 +++------ tools/lib/perf/include/internal/evlist.h | 3 ++- tools/perf/arch/arm/util/cs-etm.c | 1 + tools/perf/arch/arm64/util/arm-spe.c | 1 + tools/perf/arch/s390/util/auxtrace.c | 1 + tools/perf/arch/x86/util/intel-bts.c | 1 + tools/perf/arch/x86/util/intel-pt.c | 1 + tools/perf/util/auxtrace.c | 13 ++++++++++--- tools/perf/util/auxtrace.h | 14 ++++++++++---- tools/perf/util/evlist.c | 6 ++++-- tools/perf/util/evsel.h | 1 + tools/perf/util/mmap.c | 4 ++-- 12 files changed, 37 insertions(+), 18 deletions(-)
From: Adrian Hunter adrian.hunter@intel.com
mainline inclusion from mainline-v5.19-rc1 commit 6a7b8a5a30e60e27cd2489af3d0a441280b441e6 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=...
--------------------------------
Remove ->idx() per_cpu parameter because it isn't needed.
Signed-off-by: Adrian Hunter adrian.hunter@intel.com Acked-by: Ian 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: Arnaldo Carvalho de Melo acme@redhat.com Signed-off-by: Junhao He hejunhao3@huawei.com --- tools/lib/perf/evlist.c | 4 ++-- tools/lib/perf/include/internal/evlist.h | 2 +- tools/perf/util/evlist.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c index f76b1a9d5..8376c1241 100644 --- a/tools/lib/perf/evlist.c +++ b/tools/lib/perf/evlist.c @@ -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, diff --git a/tools/lib/perf/include/internal/evlist.h b/tools/lib/perf/include/internal/evlist.h index 2d0fa02b0..05d50387e 100644 --- a/tools/lib/perf/include/internal/evlist.h +++ b/tools/lib/perf/include/internal/evlist.h @@ -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 diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index f62244c82..83ef73ddf 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -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); }
From: Adrian Hunter adrian.hunter@intel.com
mainline inclusion from mainline-v5.19-rc1 commit d8fe2efb65acdc213eb180b7853fc1121c1bff37 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=...
--------------------------------
Remove ->idx() per_cpu parameter because it isn't needed. Move ->idx() into mmap_per_evsel() in preparation for adding evsel as a parameter.
Signed-off-by: Adrian Hunter adrian.hunter@intel.com Acked-by: Ian 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.com Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com Signed-off-by: Junhao He hejunhao3@huawei.com --- 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 8376c1241..668961545 100644 --- a/tools/lib/perf/evlist.c +++ b/tools/lib/perf/evlist.c @@ -468,6 +468,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;
@@ -510,9 +513,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; @@ -537,9 +537,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))
From: Adrian Hunter adrian.hunter@intel.com
mainline inclusion from mainline-v5.19-rc1 commit 8f111be6434de90c9743ea522c32b384d203a8de 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=...
--------------------------------
Remove ->idx() per_cpu parameter because it isn't needed. Add evsel as a parameter to ->idx() in preparation for correctly determining whether an auxtrace mmap is needed.
Signed-off-by: Adrian Hunter adrian.hunter@intel.com Acked-by: Ian 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-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com Signed-off-by: Junhao He hejunhao3@huawei.com --- tools/lib/perf/evlist.c | 2 +- tools/lib/perf/include/internal/evlist.h | 3 ++- tools/perf/util/evlist.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c index 668961545..0254855c9 100644 --- a/tools/lib/perf/evlist.c +++ b/tools/lib/perf/evlist.c @@ -469,7 +469,7 @@ 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); + ops->idx(evlist, evsel, mp, idx);
if (ops->mmap(map, mp, *output, evlist_cpu) < 0) return -1; diff --git a/tools/lib/perf/include/internal/evlist.h b/tools/lib/perf/include/internal/evlist.h index 05d50387e..6b4bff390 100644 --- a/tools/lib/perf/include/internal/evlist.h +++ b/tools/lib/perf/include/internal/evlist.h @@ -31,7 +31,8 @@ struct perf_evlist { };
typedef void -(*perf_evlist_mmap__cb_idx_t)(struct perf_evlist*, struct perf_mmap_param*, int); +(*perf_evlist_mmap__cb_idx_t)(struct perf_evlist*, struct perf_evsel*, + struct perf_mmap_param*, int); typedef struct perf_mmap* (*perf_evlist_mmap__cb_get_t)(struct perf_evlist*, bool, int); typedef int diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 83ef73ddf..e8ad68792 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -721,6 +721,7 @@ static struct mmap *evlist__alloc_mmap(struct evlist *evlist,
static void perf_evlist__mmap_cb_idx(struct perf_evlist *_evlist, + struct perf_evsel *_evsel __maybe_unused, struct perf_mmap_param *_mp, int idx) {
From: Adrian Hunter adrian.hunter@intel.com
mainline inclusion from mainline-v5.19-rc1 commit 7df319e5b3b60f159bebf2949f7e28823fff2086 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=...
--------------------------------
Remove ->idx() per_cpu parameter because it isn't needed. Add a flag needs_auxtrace_mmap to record whether an auxtrace mmap is needed, in preparation for correctly determining whether or not an auxtrace mmap is needed.
Signed-off-by: Adrian Hunter adrian.hunter@intel.com Acked-by: Ian 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-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com Signed-off-by: Junhao He hejunhao3@huawei.com --- tools/perf/arch/arm/util/cs-etm.c | 1 + tools/perf/arch/arm64/util/arm-spe.c | 1 + tools/perf/arch/s390/util/auxtrace.c | 1 + tools/perf/arch/x86/util/intel-bts.c | 1 + tools/perf/arch/x86/util/intel-pt.c | 1 + tools/perf/util/evsel.h | 1 + 6 files changed, 6 insertions(+)
diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c index 7af0130b3..5d31129db 100644 --- a/tools/perf/arch/arm/util/cs-etm.c +++ b/tools/perf/arch/arm/util/cs-etm.c @@ -313,6 +313,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr, } evsel->core.attr.freq = 0; evsel->core.attr.sample_period = 1; + evsel->needs_auxtrace_mmap = true; cs_etm_evsel = evsel; opts->full_auxtrace = true; } diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index 3c0d919a7..ae51700bf 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -159,6 +159,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr, } evsel->core.attr.freq = 0; evsel->core.attr.sample_period = 1; + evsel->needs_auxtrace_mmap = true; arm_spe_evsel = evsel; opts->full_auxtrace = true; } diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c index 0db5c58c9..5068baa3e 100644 --- a/tools/perf/arch/s390/util/auxtrace.c +++ b/tools/perf/arch/s390/util/auxtrace.c @@ -98,6 +98,7 @@ struct auxtrace_record *auxtrace_record__init(struct evlist *evlist, evlist__for_each_entry(evlist, pos) { if (pos->core.attr.config == PERF_EVENT_CPUM_SF_DIAG) { diagnose = 1; + pos->needs_auxtrace_mmap = true; break; } } diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c index 0dc09b580..72f4a3492 100644 --- a/tools/perf/arch/x86/util/intel-bts.c +++ b/tools/perf/arch/x86/util/intel-bts.c @@ -129,6 +129,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr, } evsel->core.attr.freq = 0; evsel->core.attr.sample_period = 1; + evsel->needs_auxtrace_mmap = true; intel_bts_evsel = evsel; opts->full_auxtrace = true; } diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index 082e5f2a4..1410b4465 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -642,6 +642,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr, evsel->core.attr.freq = 0; evsel->core.attr.sample_period = 1; evsel->no_aux_samples = true; + evsel->needs_auxtrace_mmap = true; intel_pt_evsel = evsel; opts->full_auxtrace = true; } diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 79a860d8e..bf526755f 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -110,6 +110,7 @@ struct evsel { bool merged_stat; bool reset_group; bool errored; + bool needs_auxtrace_mmap; unsigned long *per_pkg_mask; struct evsel *leader; struct list_head config_terms;
From: Adrian Hunter adrian.hunter@intel.com
mainline inclusion from mainline-v5.19-rc1 commit d01508f2df21d6793f1642b20d4c1fe2f1c7fcba 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=...
--------------------------------
Remove ->idx() per_cpu parameter because it isn't needed. Add mmap_needed to auxtrace_mmap_params.
Currently an auxtrace mmap is always attempted even if the event is not an auxtrace event. That works because, when AUX area tracing, there is always an auxtrace event first for every mmap. Prepare for that not being the case, which it won't be when sideband tracking events are allowed on all CPUs even when auxtrace is limited to selected CPUs.
Signed-off-by: Adrian Hunter adrian.hunter@intel.com Acked-by: Ian Rogers irogers@google.com Acked-by: Namhyung Kim namhyung@kernel.org Cc: Alexey Bayduraev alexey.v.bayduraev@linux.intel.com Cc: Ian Rogers irogers@google.com Cc: Jiri Olsa jolsa@kernel.org Cc: Leo Yan leo.yan@linaro.org Link: https://lore.kernel.org/r/20220524075436.29144-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com Signed-off-by: Junhao He hejunhao3@huawei.com --- tools/perf/util/auxtrace.c | 10 ++++++++-- tools/perf/util/auxtrace.h | 11 +++++++++-- tools/perf/util/evlist.c | 5 +++-- tools/perf/util/mmap.c | 1 + 4 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 5df645f1e..f0f8a0920 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -128,7 +128,7 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, mm->tid = mp->tid; mm->cpu = mp->cpu;
- if (!mp->len) { + if (!mp->len || !mp->mmap_needed) { mm->base = NULL; return 0; } @@ -176,9 +176,15 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp, }
void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, - struct evlist *evlist, int idx, + struct evlist *evlist, + struct evsel *evsel, int idx, bool per_cpu) { + mp->mmap_needed = evsel->needs_auxtrace_mmap; + + if (!mp->mmap_needed) + return; + mp->idx = idx;
if (per_cpu) { diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 3a4e921f9..dba45e220 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -333,6 +333,10 @@ struct auxtrace_mmap { * @idx: index of this mmap * @tid: tid for a per-thread mmap (also set if there is only 1 tid on a per-cpu * mmap) otherwise %0 + * @mmap_needed: set to %false for non-auxtrace events. This is needed because + * auxtrace mmapping is done in the same code path as non-auxtrace + * mmapping but not every evsel that needs non-auxtrace mmapping + * also needs auxtrace mmapping. * @cpu: cpu number for a per-cpu mmap otherwise %-1 */ struct auxtrace_mmap_params { @@ -342,6 +346,7 @@ struct auxtrace_mmap_params { int prot; int idx; pid_t tid; + bool mmap_needed; int cpu; };
@@ -492,7 +497,8 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp, unsigned int auxtrace_pages, bool auxtrace_overwrite); void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, - struct evlist *evlist, int idx, + struct evlist *evlist, + struct evsel *evsel, int idx, bool per_cpu);
typedef int (*process_auxtrace_t)(struct perf_tool *tool, @@ -823,7 +829,8 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp, unsigned int auxtrace_pages, bool auxtrace_overwrite); void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, - struct evlist *evlist, int idx, + struct evlist *evlist, + struct evsel *evsel, int idx, bool per_cpu);
#define ITRACE_HELP "" diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index e8ad68792..39ebacffa 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -721,15 +721,16 @@ static struct mmap *evlist__alloc_mmap(struct evlist *evlist,
static void perf_evlist__mmap_cb_idx(struct perf_evlist *_evlist, - struct perf_evsel *_evsel __maybe_unused, + struct perf_evsel *_evsel, struct perf_mmap_param *_mp, 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); + struct evsel *evsel = container_of(_evsel, struct evsel, core);
- auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, idx, per_cpu); + auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, evsel, idx, per_cpu); }
static struct perf_mmap* diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index ab7108d22..c19d6a009 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -62,6 +62,7 @@ void __weak auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp __maybe_u
void __weak auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp __maybe_unused, struct evlist *evlist __maybe_unused, + struct evsel *evsel __maybe_unused, int idx __maybe_unused, bool per_cpu __maybe_unused) {
From: Adrian Hunter adrian.hunter@intel.com
mainline inclusion from mainline-v5.19-rc1 commit 84bd5aba88af7b6ec46ea88e01588f93c6aa782f 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=...
--------------------------------
Remove ->idx() per_cpu parameter because it isn't needed. Remove auxtrace_mmap_params__set_idx() per_cpu parameter because it isn't needed.
Signed-off-by: Adrian Hunter adrian.hunter@intel.com Acked-by: Ian Rogers irogers@google.com Acked-by: Namhyung Kim namhyung@kernel.org Cc: Alexey Bayduraev alexey.v.bayduraev@linux.intel.com Cc: Jiri Olsa jolsa@kernel.org Cc: Leo Yan leo.yan@linaro.org Link: https://lore.kernel.org/r/20220524075436.29144-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo acme@redhat.com Signed-off-by: Junhao He hejunhao3@huawei.com --- tools/perf/util/auxtrace.c | 5 +++-- tools/perf/util/auxtrace.h | 7 +++---- tools/perf/util/evlist.c | 3 +-- tools/perf/util/mmap.c | 3 +-- 4 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index f0f8a0920..1972574d7 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -177,9 +177,10 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, struct evlist *evlist, - struct evsel *evsel, int idx, - bool per_cpu) + struct evsel *evsel, int idx) { + bool per_cpu = !perf_cpu_map__empty(evlist->core.cpus); + mp->mmap_needed = evsel->needs_auxtrace_mmap;
if (!mp->mmap_needed) diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index dba45e220..f8ba783a8 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -15,6 +15,7 @@ #include <linux/list.h> #include <linux/perf_event.h> #include <linux/types.h> +#include <perf/cpumap.h> #include <asm/bitsperlong.h> #include <asm/barrier.h>
@@ -498,8 +499,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp, bool auxtrace_overwrite); void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, struct evlist *evlist, - struct evsel *evsel, int idx, - bool per_cpu); + struct evsel *evsel, int idx);
typedef int (*process_auxtrace_t)(struct perf_tool *tool, struct mmap *map, @@ -830,8 +830,7 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp, bool auxtrace_overwrite); void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, struct evlist *evlist, - struct evsel *evsel, int idx, - bool per_cpu); + struct evsel *evsel, int idx);
#define ITRACE_HELP ""
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 39ebacffa..66b230fe3 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -727,10 +727,9 @@ perf_evlist__mmap_cb_idx(struct perf_evlist *_evlist, { 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); struct evsel *evsel = container_of(_evsel, struct evsel, core);
- auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, evsel, idx, per_cpu); + auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, evsel, idx); }
static struct perf_mmap* diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index c19d6a009..daedd2fc3 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -63,8 +63,7 @@ void __weak auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp __maybe_u void __weak auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp __maybe_unused, struct evlist *evlist __maybe_unused, struct evsel *evsel __maybe_unused, - int idx __maybe_unused, - bool per_cpu __maybe_unused) + int idx __maybe_unused) { }
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/1282 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/5...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/1282 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/5...