[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d99fb75-d1f2-49a6-aed3-d4b0848201ca@intel.com>
Date: Fri, 10 Mar 2023 09:30:31 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Ian Rogers <irogers@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>,
Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>,
"Steinar H. Gunderson" <sesse@...gle.com>,
Kim Phillips <kim.phillips@....com>,
Florian Fischer <florian.fischer@...q.space>,
James Clark <james.clark@....com>,
Suzuki Poulouse <suzuki.poulose@....com>,
Sean Christopherson <seanjc@...gle.com>,
Leo Yan <leo.yan@...aro.org>,
John Garry <john.g.garry@...cle.com>,
Kajol Jain <kjain@...ux.ibm.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v4 03/11] perf pmu: Earlier PMU auxtrace initialization
On 9/03/23 00:59, Ian Rogers wrote:
> This allows event parsing to use the evsel__is_aux_event function,
> which is important when determining event grouping.
>
> Suggested-by: Adrian Hunter <adrian.hunter@...el.com>
> Signed-off-by: Ian Rogers <irogers@...gle.com>
Thank you!
Acked-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
> tools/perf/arch/x86/util/auxtrace.c | 4 ----
> tools/perf/arch/x86/util/pmu.c | 8 ++++++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tools/perf/arch/x86/util/auxtrace.c b/tools/perf/arch/x86/util/auxtrace.c
> index 3da506e13f49..330d03216b0e 100644
> --- a/tools/perf/arch/x86/util/auxtrace.c
> +++ b/tools/perf/arch/x86/util/auxtrace.c
> @@ -26,11 +26,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
> bool found_bts = false;
>
> intel_pt_pmu = perf_pmu__find(INTEL_PT_PMU_NAME);
> - if (intel_pt_pmu)
> - intel_pt_pmu->auxtrace = true;
> intel_bts_pmu = perf_pmu__find(INTEL_BTS_PMU_NAME);
> - if (intel_bts_pmu)
> - intel_bts_pmu->auxtrace = true;
>
> evlist__for_each_entry(evlist, evsel) {
> if (intel_pt_pmu && evsel->core.attr.type == intel_pt_pmu->type)
> diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c
> index 358340b34243..f73b80dcd8bd 100644
> --- a/tools/perf/arch/x86/util/pmu.c
> +++ b/tools/perf/arch/x86/util/pmu.c
> @@ -27,10 +27,14 @@ static bool cached_list;
> struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
> {
> #ifdef HAVE_AUXTRACE_SUPPORT
> - if (!strcmp(pmu->name, INTEL_PT_PMU_NAME))
> + if (!strcmp(pmu->name, INTEL_PT_PMU_NAME)) {
> + pmu->auxtrace = true;
> return intel_pt_pmu_default_config(pmu);
> - if (!strcmp(pmu->name, INTEL_BTS_PMU_NAME))
> + }
> + if (!strcmp(pmu->name, INTEL_BTS_PMU_NAME)) {
> + pmu->auxtrace = true;
> pmu->selectable = true;
> + }
> #endif
> return NULL;
> }
Powered by blists - more mailing lists