diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-04-11 06:16:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-04-17 03:58:47 -0400 |
commit | 517e6341fa123ec3a2f9ea78ad547be910529881 (patch) | |
tree | 5325aa3c9f26847fa9fa6aea805e4bdc084592c5 /arch/x86 | |
parent | c857eb56e6e8e53dccd8d1e7ea90bcaf3311996d (diff) |
perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events
Ingo reported that cycles:pp didn't work for him on some machines.
It turns out that in this commit:
af4bdcf675cf perf/x86/intel: Disallow flags for most Core2/Atom/Nehalem/Westmere events
Andi forgot to explicitly allow that event when he
disabled event flags for PEBS on those uarchs.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: af4bdcf675cf ("perf/x86/intel: Disallow flags for most Core2/Atom/Nehalem/Westmere events")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_ds.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c index ca69ea56c712..813f75d71175 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_ds.c +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c | |||
@@ -558,6 +558,8 @@ struct event_constraint intel_core2_pebs_event_constraints[] = { | |||
558 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x00c5, 0x1), /* BR_INST_RETIRED.MISPRED */ | 558 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x00c5, 0x1), /* BR_INST_RETIRED.MISPRED */ |
559 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x1fc7, 0x1), /* SIMD_INST_RETURED.ANY */ | 559 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x1fc7, 0x1), /* SIMD_INST_RETURED.ANY */ |
560 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0x1), /* MEM_LOAD_RETIRED.* */ | 560 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0x1), /* MEM_LOAD_RETIRED.* */ |
561 | /* INST_RETIRED.ANY_P, inv=1, cmask=16 (cycles:p). */ | ||
562 | INTEL_FLAGS_EVENT_CONSTRAINT(0x108000c0, 0x01), | ||
561 | EVENT_CONSTRAINT_END | 563 | EVENT_CONSTRAINT_END |
562 | }; | 564 | }; |
563 | 565 | ||
@@ -565,6 +567,8 @@ struct event_constraint intel_atom_pebs_event_constraints[] = { | |||
565 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x00c0, 0x1), /* INST_RETIRED.ANY */ | 567 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x00c0, 0x1), /* INST_RETIRED.ANY */ |
566 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x00c5, 0x1), /* MISPREDICTED_BRANCH_RETIRED */ | 568 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x00c5, 0x1), /* MISPREDICTED_BRANCH_RETIRED */ |
567 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0x1), /* MEM_LOAD_RETIRED.* */ | 569 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0x1), /* MEM_LOAD_RETIRED.* */ |
570 | /* INST_RETIRED.ANY_P, inv=1, cmask=16 (cycles:p). */ | ||
571 | INTEL_FLAGS_EVENT_CONSTRAINT(0x108000c0, 0x01), | ||
568 | EVENT_CONSTRAINT_END | 572 | EVENT_CONSTRAINT_END |
569 | }; | 573 | }; |
570 | 574 | ||
@@ -588,6 +592,8 @@ struct event_constraint intel_nehalem_pebs_event_constraints[] = { | |||
588 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x20c8, 0xf), /* ITLB_MISS_RETIRED */ | 592 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x20c8, 0xf), /* ITLB_MISS_RETIRED */ |
589 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0xf), /* MEM_LOAD_RETIRED.* */ | 593 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0xf), /* MEM_LOAD_RETIRED.* */ |
590 | INTEL_FLAGS_EVENT_CONSTRAINT(0xf7, 0xf), /* FP_ASSIST.* */ | 594 | INTEL_FLAGS_EVENT_CONSTRAINT(0xf7, 0xf), /* FP_ASSIST.* */ |
595 | /* INST_RETIRED.ANY_P, inv=1, cmask=16 (cycles:p). */ | ||
596 | INTEL_FLAGS_EVENT_CONSTRAINT(0x108000c0, 0x0f), | ||
591 | EVENT_CONSTRAINT_END | 597 | EVENT_CONSTRAINT_END |
592 | }; | 598 | }; |
593 | 599 | ||
@@ -603,6 +609,8 @@ struct event_constraint intel_westmere_pebs_event_constraints[] = { | |||
603 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x20c8, 0xf), /* ITLB_MISS_RETIRED */ | 609 | INTEL_FLAGS_UEVENT_CONSTRAINT(0x20c8, 0xf), /* ITLB_MISS_RETIRED */ |
604 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0xf), /* MEM_LOAD_RETIRED.* */ | 610 | INTEL_FLAGS_EVENT_CONSTRAINT(0xcb, 0xf), /* MEM_LOAD_RETIRED.* */ |
605 | INTEL_FLAGS_EVENT_CONSTRAINT(0xf7, 0xf), /* FP_ASSIST.* */ | 611 | INTEL_FLAGS_EVENT_CONSTRAINT(0xf7, 0xf), /* FP_ASSIST.* */ |
612 | /* INST_RETIRED.ANY_P, inv=1, cmask=16 (cycles:p). */ | ||
613 | INTEL_FLAGS_EVENT_CONSTRAINT(0x108000c0, 0x0f), | ||
606 | EVENT_CONSTRAINT_END | 614 | EVENT_CONSTRAINT_END |
607 | }; | 615 | }; |
608 | 616 | ||