lkml.org 
[lkml]   [2023]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH v1 2/7] perf intel-pt: Move PMU initialization from default config code
    From
    Avoid setting PMU values in intel_pt_pmu_default_config, move to
    perf_pmu__arch_init.

    Signed-off-by: Ian Rogers <irogers@google.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)) {
    --
    2.42.0.609.gbb76f46606-goog
    \
     
     \ /
      Last update: 2023-10-07 04:17    [W:6.254 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site