diff options
author | Stephane Eranian <eranian@google.com> | 2011-12-11 00:28:51 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-21 10:26:32 +0100 |
commit | cd09c0c40a971549800ce6a7e53c63f5139dd175 (patch) | |
tree | b51a9edb0c500feb719fdb2e571a6dc204fdbe18 /arch/x86/kernel/cpu/perf_event.c | |
parent | d9e24427f339e5c18419769d41697062811c5cd8 (diff) | |
download | blackbird-op-linux-cd09c0c40a971549800ce6a7e53c63f5139dd175.tar.gz blackbird-op-linux-cd09c0c40a971549800ce6a7e53c63f5139dd175.zip |
perf events: Enable raw event support for Intel unhalted_reference_cycles event
This patch adds the encoding and definitions necessary for the
unhalted_reference_cycles event avaialble since Intel Core 2 processors.
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1323559734-3488-2-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 930fe4879542..5adce1040b11 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -1304,9 +1304,15 @@ static int __init init_hw_perf_events(void) 0, x86_pmu.num_counters, 0); if (x86_pmu.event_constraints) { + /* + * event on fixed counter2 (REF_CYCLES) only works on this + * counter, so do not extend mask to generic counters + */ for_each_event_constraint(c, x86_pmu.event_constraints) { - if (c->cmask != X86_RAW_EVENT_MASK) + if (c->cmask != X86_RAW_EVENT_MASK + || c->idxmsk64 == X86_PMC_MSK_FIXED_REF_CYCLES) { continue; + } c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1; c->weight += x86_pmu.num_counters; |