perf/x86-ibs: Enable ibs op micro-ops counting mode
authorRobert Richter <robert.richter@amd.com>
Mon, 2 Apr 2012 18:19:09 +0000 (20:19 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 9 May 2012 13:23:12 +0000 (15:23 +0200)
Allow enabling ibs op micro-ops counting mode.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333390758-10893-4-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_amd_ibs.c

index 2317228b529989350302b428c7fb6b32a9cf1ecb..ebf169fe40ef6fb6e7a836c7b82639c9dc01ec8b 100644 (file)
@@ -468,6 +468,8 @@ static __init int perf_event_ibs_init(void)
                return -ENODEV; /* ibs not supported by the cpu */
 
        perf_ibs_pmu_init(&perf_ibs_fetch, "ibs_fetch");
+       if (ibs_caps & IBS_CAPS_OPCNT)
+               perf_ibs_op.config_mask |= IBS_OP_CNT_CTL;
        perf_ibs_pmu_init(&perf_ibs_op, "ibs_op");
        register_nmi_handler(NMI_LOCAL, perf_ibs_nmi_handler, 0, "perf_ibs");
        printk(KERN_INFO "perf: AMD IBS detected (0x%08x)\n", ibs_caps);