perf, x86: Store perfctr msr addresses in config_base/event_base
Instead of storing the base addresses we can store the counter's msr addresses directly in config_base/event_base of struct hw_perf_event. This avoids recalculating the address with each msr access. The addresses are configured one time. We also need this change to later modify the address calculation. Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1296664860-10886-5-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
69d8e1e8ac
commit
73d6e52206
@ -68,7 +68,7 @@ p6_pmu_disable_event(struct perf_event *event)
|
||||
if (cpuc->enabled)
|
||||
val |= ARCH_PERFMON_EVENTSEL_ENABLE;
|
||||
|
||||
(void)checking_wrmsrl(hwc->config_base + hwc->idx, val);
|
||||
(void)checking_wrmsrl(hwc->config_base, val);
|
||||
}
|
||||
|
||||
static void p6_pmu_enable_event(struct perf_event *event)
|
||||
@ -81,7 +81,7 @@ static void p6_pmu_enable_event(struct perf_event *event)
|
||||
if (cpuc->enabled)
|
||||
val |= ARCH_PERFMON_EVENTSEL_ENABLE;
|
||||
|
||||
(void)checking_wrmsrl(hwc->config_base + hwc->idx, val);
|
||||
(void)checking_wrmsrl(hwc->config_base, val);
|
||||
}
|
||||
|
||||
static __initconst const struct x86_pmu p6_pmu = {
|
||||
|
Reference in New Issue
Block a user