Messages in this thread | | | Date | Fri, 15 Apr 2022 10:25:39 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v3 09/11] perf: x86/core: Add interface to query perfmon_event_map[] directly |
| |
On Mon, Apr 11, 2022 at 05:35:35PM +0800, Like Xu wrote: > From: Like Xu <likexu@tencent.com> > > Currently, we have [intel|knc|p4|p6]_perfmon_event_map on the Intel > platforms and amd_[f17h]_perfmon_event_map on the AMD platforms. > > Early clumsy KVM code or other potential perf_event users may have > hard-coded these perfmon_maps (e.g., arch/x86/kvm/svm/pmu.c), so > it would not make sense to program a common hardware event based > on the generic "enum perf_hw_id" once the two tables do not match. > > Let's provide an interface for callers outside the perf subsystem to get > the counter config based on the perfmon_event_map currently in use, > and it also helps to save bytes. > > Cc: Peter Zijlstra <peterz@infradead.org> > Signed-off-by: Like Xu <likexu@tencent.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
| |