[PATCH v1 2/7] perf intel-pt: Move PMU initialization from default config code
Adrian Hunter
adrian.hunter at intel.com
Thu Oct 12 04:52:20 PDT 2023
On 7/10/23 05:13, Ian Rogers wrote:
> Avoid setting PMU values in intel_pt_pmu_default_config, move to
> perf_pmu__arch_init.
>
> Signed-off-by: Ian Rogers <irogers at google.com>
Reviewed-by: Adrian Hunter <adrian.hunter at intel.com>
> ---
> tools/perf/arch/x86/util/intel-pt.c | 2 --
> tools/perf/arch/x86/util/pmu.c | 1 +
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
> index b923bca939d9..6d6cd8f9133c 100644
> --- a/tools/perf/arch/x86/util/intel-pt.c
> +++ b/tools/perf/arch/x86/util/intel-pt.c
> @@ -267,8 +267,6 @@ intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu)
>
> attr->config = intel_pt_default_config(intel_pt_pmu);
>
> - intel_pt_pmu->selectable = true;
> -
> return attr;
> }
>
> diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c
> index 811e2377d2d5..949b3e2c67bd 100644
> --- a/tools/perf/arch/x86/util/pmu.c
> +++ b/tools/perf/arch/x86/util/pmu.c
> @@ -22,6 +22,7 @@ void perf_pmu__arch_init(struct perf_pmu *pmu __maybe_unused)
> #ifdef HAVE_AUXTRACE_SUPPORT
> if (!strcmp(pmu->name, INTEL_PT_PMU_NAME)) {
> pmu->auxtrace = true;
> + pmu->selectable = true;
> pmu->default_config = intel_pt_pmu_default_config(pmu);
> }
> if (!strcmp(pmu->name, INTEL_BTS_PMU_NAME)) {
More information about the linux-arm-kernel
mailing list