• Ian Rogers's avatar
    perf pmu: Improve name/comments, avoid a memory allocation · 240e6fd0
    Ian Rogers authored
    Improve documentation around perf_pmu_alias pmu_name and on
    functions.
    
    Reduce the scope of pmu_uncore_alias_match to just file.
    
    Rename perf_pmu__valid_suffix to the more revealing
    perf_pmu__match_ignoring_suffix.
    
    Add a short-cut to perf_pmu__match_ignoring_suffix for PMU names that
    don't also have a socket value, and can therefore avoid a memory
    allocation.
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ravi Bangoria <ravi.bangoria@amd.com>
    Cc: Rob Herring <robh@kernel.org>
    Cc: Sean Christopherson <seanjc@google.com>
    Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20230406235256.2768773-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    240e6fd0
pmu.h 8.35 KB