diff options
| author | Kan Liang <kan.liang@linux.intel.com> | 2021-06-30 14:08:36 -0700 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2021-07-02 15:58:40 +0200 |
| commit | 8053f2d752e2936f494ede62766a6c9e9fb674f2 (patch) | |
| tree | 6c0d8ea42951cda2d805f1fdf064a6779a65ea3f /arch/x86/events/intel/uncore.h | |
| parent | perf/x86/intel/uncore: Add Sapphire Rapids server MDF support (diff) | |
| download | linux-8053f2d752e2936f494ede62766a6c9e9fb674f2.tar.gz linux-8053f2d752e2936f494ede62766a6c9e9fb674f2.zip | |
perf/x86/intel/uncore: Add alias PMU name
A perf PMU may have two PMU names. For example, Intel Sapphire Rapids
server supports the discovery mechanism. Without the platform-specific
support, an uncore PMU is named by a type ID plus a box ID, e.g.,
uncore_type_0_0, because the real name of the uncore PMU cannot be
retrieved from the discovery table. With the platform-specific support
later, perf has the mapping information from a type ID to a specific
uncore unit. Just like the previous platforms, the uncore PMU is named
by the real PMU name, e.g., uncore_cha_0. The user scripts which work
well with the old numeric name may not work anymore.
Add a new attribute "alias" to indicate the old numeric name. The
following userspace perf tool patch will handle both names. The user
scripts should work properly with the updated perf tool.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/r/1625087320-194204-13-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/events/intel/uncore.h')
| -rw-r--r-- | arch/x86/events/intel/uncore.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h index fa0e938f0141..b9687980aab6 100644 --- a/arch/x86/events/intel/uncore.h +++ b/arch/x86/events/intel/uncore.h @@ -561,6 +561,7 @@ struct event_constraint * uncore_get_constraint(struct intel_uncore_box *box, struct perf_event *event); void uncore_put_constraint(struct intel_uncore_box *box, struct perf_event *event); u64 uncore_shared_reg_config(struct intel_uncore_box *box, int idx); +void uncore_get_alias_name(char *pmu_name, struct intel_uncore_pmu *pmu); extern struct intel_uncore_type *empty_uncore[]; extern struct intel_uncore_type **uncore_msr_uncores; |
