perf: PEBS events cleanup
Subsystems (2)
cover perf: PEBS events cleanup
[PATCH 1/2] perf: x86, SandyBridge PEBS events cleanup
[PATCH 2/2] perf: x86, use INTEL_*_CONSTRAINT for all PEBS event constraints
Thanks,
Lin Ming
PATCH 1/2 perf: x86, SandyBridge PEBS events cleanup
Use INTEL_EVENT_CONSTRAINT() for the events where all umasks support PEBS
--- arch/x86/kernel/cpu/perf_event_intel_ds.c | 27 +++++---------------------- 1 files changed, 5 insertions(+), 22 deletions(-)
arch/x86/kernel/cpu/perf_event_intel_ds.c +5 -22
@@ -412,20 +412,9 @@ static struct event_constraint intel_snb_pebs_events[] = {PEBS_EVENT_CONSTRAINT (0x01c0 ,0x2 ),/* INST_RETIRED.PRECDIST */ PEBS_EVENT_CONSTRAINT (0x01c2 ,0xf ),/* UOPS_RETIRED.ALL */ PEBS_EVENT_CONSTRAINT (0x02c2 ,0xf ),/* UOPS_RETIRED.RETIRE_SLOTS */ -PEBS_EVENT_CONSTRAINT (0x01c4 ,0xf ),/* BR_INST_RETIRED.CONDITIONAL */ -PEBS_EVENT_CONSTRAINT (0x02c4 ,0xf ),/* BR_INST_RETIRED.NEAR_CALL */ -PEBS_EVENT_CONSTRAINT (0x04c4 ,0xf ),/* BR_INST_RETIRED.ALL_BRANCHES */ -PEBS_EVENT_CONSTRAINT (0x08c4 ,0xf ),/* BR_INST_RETIRED.NEAR_RETURN */ -PEBS_EVENT_CONSTRAINT (0x10c4 ,0xf ),/* BR_INST_RETIRED.NOT_TAKEN */ -PEBS_EVENT_CONSTRAINT (0x20c4 ,0xf ),/* BR_INST_RETIRED.NEAR_TAKEN */ -PEBS_EVENT_CONSTRAINT (0x40c4 ,0xf ),/* BR_INST_RETIRED.FAR_BRANCH */ -PEBS_EVENT_CONSTRAINT (0x01c5 ,0xf ),/* BR_MISP_RETIRED.CONDITIONAL */ -PEBS_EVENT_CONSTRAINT (0x02c5 ,0xf ),/* BR_MISP_RETIRED.NEAR_CALL */ -PEBS_EVENT_CONSTRAINT (0x04c5 ,0xf ),/* BR_MISP_RETIRED.ALL_BRANCHES */ -PEBS_EVENT_CONSTRAINT (0x10c5 ,0xf ),/* BR_MISP_RETIRED.NOT_TAKEN */ -PEBS_EVENT_CONSTRAINT (0x20c5 ,0xf ),/* BR_MISP_RETIRED.TAKEN */ -PEBS_EVENT_CONSTRAINT (0x01cd ,0x8 ),/* MEM_TRANS_RETIRED.LOAD_LATENCY */ -PEBS_EVENT_CONSTRAINT (0x02cd ,0x8 ),/* MEM_TRANS_RETIRED.PRECISE_STORE */ +INTEL_EVENT_CONSTRAINT (0xc4 ,0xf ),/* BR_INST_RETIRED.* */ +INTEL_EVENT_CONSTRAINT (0xc5 ,0xf ),/* BR_MISP_RETIRED.* */ +INTEL_EVENT_CONSTRAINT (0xcd ,0x8 ),/* MEM_TRANS_RETIRED.* */ PEBS_EVENT_CONSTRAINT (0x11d0 ,0xf ),/* MEM_UOP_RETIRED.STLB_MISS_LOADS */ PEBS_EVENT_CONSTRAINT (0x12d0 ,0xf ),/* MEM_UOP_RETIRED.STLB_MISS_STORES */ PEBS_EVENT_CONSTRAINT(0x21d0, 0xf), /* MEM_UOP_RETIRED.LOCK_LOADS */
@@ -434,14 +423,8 @@ static struct event_constraint intel_snb_pebs_events[] = {PEBS_EVENT_CONSTRAINT (0x42d0 ,0xf ),/* MEM_UOP_RETIRED.SPLIT_STORES */ PEBS_EVENT_CONSTRAINT (0x81d0 ,0xf ),/* MEM_UOP_RETIRED.ANY_LOADS */ PEBS_EVENT_CONSTRAINT (0x82d0 ,0xf ),/* MEM_UOP_RETIRED.ANY_STORES */ -PEBS_EVENT_CONSTRAINT (0x01d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.L1_HIT */ -PEBS_EVENT_CONSTRAINT (0x02d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.L2_HIT */ -PEBS_EVENT_CONSTRAINT (0x04d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.LLC_HIT */ -PEBS_EVENT_CONSTRAINT (0x40d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.HIT_LFB */ -PEBS_EVENT_CONSTRAINT (0x01d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS */ -PEBS_EVENT_CONSTRAINT (0x02d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT */ -PEBS_EVENT_CONSTRAINT (0x04d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM */ -PEBS_EVENT_CONSTRAINT (0x08d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE */ +INTEL_EVENT_CONSTRAINT (0xd1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.* */ +INTEL_EVENT_CONSTRAINT (0xd2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */ PEBS_EVENT_CONSTRAINT (0x02d4 ,0xf ),/* MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS */ EVENT_CONSTRAINT_END };
Signature · 1 line
1.7.3
[tip:perf/urgent] perf, x86: Clean up SandyBridge PEBS events
Commit-ID: eefaaac46470d105f58cff93c8176cfadc75b857 Gitweb: http://git.kernel.org/tip/eefaaac46470d105f58cff93c8176cfadc75b857 Author: Lin Ming <[email protected]> AuthorDate: Wed, 9 Mar 2011 23:21:28 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 16 Mar 2011 14:04:12 +0100
perf, x86: Clean up SandyBridge PEBS events
Use INTEL_EVENT_CONSTRAINT() for the events where all umasks support PEBS.
LKML-Reference: <[email protected]>
--- arch/x86/kernel/cpu/perf_event_intel_ds.c | 27 +++++---------------------- 1 files changed, 5 insertions(+), 22 deletions(-)
arch/x86/kernel/cpu/perf_event_intel_ds.c +5 -22
@@ -412,20 +412,9 @@ static struct event_constraint intel_snb_pebs_events[] = {PEBS_EVENT_CONSTRAINT (0x01c0 ,0x2 ),/* INST_RETIRED.PRECDIST */ PEBS_EVENT_CONSTRAINT (0x01c2 ,0xf ),/* UOPS_RETIRED.ALL */ PEBS_EVENT_CONSTRAINT (0x02c2 ,0xf ),/* UOPS_RETIRED.RETIRE_SLOTS */ -PEBS_EVENT_CONSTRAINT (0x01c4 ,0xf ),/* BR_INST_RETIRED.CONDITIONAL */ -PEBS_EVENT_CONSTRAINT (0x02c4 ,0xf ),/* BR_INST_RETIRED.NEAR_CALL */ -PEBS_EVENT_CONSTRAINT (0x04c4 ,0xf ),/* BR_INST_RETIRED.ALL_BRANCHES */ -PEBS_EVENT_CONSTRAINT (0x08c4 ,0xf ),/* BR_INST_RETIRED.NEAR_RETURN */ -PEBS_EVENT_CONSTRAINT (0x10c4 ,0xf ),/* BR_INST_RETIRED.NOT_TAKEN */ -PEBS_EVENT_CONSTRAINT (0x20c4 ,0xf ),/* BR_INST_RETIRED.NEAR_TAKEN */ -PEBS_EVENT_CONSTRAINT (0x40c4 ,0xf ),/* BR_INST_RETIRED.FAR_BRANCH */ -PEBS_EVENT_CONSTRAINT (0x01c5 ,0xf ),/* BR_MISP_RETIRED.CONDITIONAL */ -PEBS_EVENT_CONSTRAINT (0x02c5 ,0xf ),/* BR_MISP_RETIRED.NEAR_CALL */ -PEBS_EVENT_CONSTRAINT (0x04c5 ,0xf ),/* BR_MISP_RETIRED.ALL_BRANCHES */ -PEBS_EVENT_CONSTRAINT (0x10c5 ,0xf ),/* BR_MISP_RETIRED.NOT_TAKEN */ -PEBS_EVENT_CONSTRAINT (0x20c5 ,0xf ),/* BR_MISP_RETIRED.TAKEN */ -PEBS_EVENT_CONSTRAINT (0x01cd ,0x8 ),/* MEM_TRANS_RETIRED.LOAD_LATENCY */ -PEBS_EVENT_CONSTRAINT (0x02cd ,0x8 ),/* MEM_TRANS_RETIRED.PRECISE_STORE */ +INTEL_EVENT_CONSTRAINT (0xc4 ,0xf ),/* BR_INST_RETIRED.* */ +INTEL_EVENT_CONSTRAINT (0xc5 ,0xf ),/* BR_MISP_RETIRED.* */ +INTEL_EVENT_CONSTRAINT (0xcd ,0x8 ),/* MEM_TRANS_RETIRED.* */ PEBS_EVENT_CONSTRAINT (0x11d0 ,0xf ),/* MEM_UOP_RETIRED.STLB_MISS_LOADS */ PEBS_EVENT_CONSTRAINT (0x12d0 ,0xf ),/* MEM_UOP_RETIRED.STLB_MISS_STORES */ PEBS_EVENT_CONSTRAINT(0x21d0, 0xf), /* MEM_UOP_RETIRED.LOCK_LOADS */
@@ -434,14 +423,8 @@ static struct event_constraint intel_snb_pebs_events[] = {PEBS_EVENT_CONSTRAINT (0x42d0 ,0xf ),/* MEM_UOP_RETIRED.SPLIT_STORES */ PEBS_EVENT_CONSTRAINT (0x81d0 ,0xf ),/* MEM_UOP_RETIRED.ANY_LOADS */ PEBS_EVENT_CONSTRAINT (0x82d0 ,0xf ),/* MEM_UOP_RETIRED.ANY_STORES */ -PEBS_EVENT_CONSTRAINT (0x01d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.L1_HIT */ -PEBS_EVENT_CONSTRAINT (0x02d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.L2_HIT */ -PEBS_EVENT_CONSTRAINT (0x04d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.LLC_HIT */ -PEBS_EVENT_CONSTRAINT (0x40d1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.HIT_LFB */ -PEBS_EVENT_CONSTRAINT (0x01d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS */ -PEBS_EVENT_CONSTRAINT (0x02d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT */ -PEBS_EVENT_CONSTRAINT (0x04d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM */ -PEBS_EVENT_CONSTRAINT (0x08d2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE */ +INTEL_EVENT_CONSTRAINT (0xd1 ,0xf ),/* MEM_LOAD_UOPS_RETIRED.* */ +INTEL_EVENT_CONSTRAINT (0xd2 ,0xf ),/* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */ PEBS_EVENT_CONSTRAINT (0x02d4 ,0xf ),/* MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS */ EVENT_CONSTRAINT_END };
PATCH 2/2 perf: x86, use INTEL_*_CONSTRAINT for all PEBS event constraints
In reply to Lin MingPEBS_EVENT_CONSTRAINT is just a duplicate of INTEL_UEVENT_CONSTRAINT. Remove it and use INTEL_UEVENT_CONSTRAINT instead.
--- arch/x86/kernel/cpu/perf_event.c | 2 - arch/x86/kernel/cpu/perf_event_intel_ds.c | 95 ++++++++++++++--------------- 2 files changed, 47 insertions(+), 50 deletions(-)
arch/x86/kernel/cpu/perf_event.c +0 -2
@@ -178,8 +178,6 @@ struct cpu_hw_events {*/ #define INTEL_UEVENT_CONSTRAINT (c, n) \ EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK) -#define PEBS_EVENT_CONSTRAINT (c, n) \ - INTEL_UEVENT_CONSTRAINT(c, n)#define EVENT_CONSTRAINT_END \ EVENT_CONSTRAINT(0, 0, 0)
arch/x86/kernel/cpu/perf_event_intel_ds.c +47 -48
117 lines not on this page · raw message
Signature · 1 line
1.7.3
[tip:perf/urgent] perf, x86: Use INTEL_*_CONSTRAINT() for all PEBS event constraints
Commit-ID: 7d5d02dadd43db7f829775e404e82019c5d5586f Gitweb: http://git.kernel.org/tip/7d5d02dadd43db7f829775e404e82019c5d5586f Author: Lin Ming <[email protected]> AuthorDate: Wed, 9 Mar 2011 23:21:29 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 16 Mar 2011 14:04:12 +0100
perf, x86: Use INTEL_*_CONSTRAINT() for all PEBS event constraints
PEBS_EVENT_CONSTRAINT() is just a duplicate of INTEL_UEVENT_CONSTRAINT(). Remove it and use INTEL_UEVENT_CONSTRAINT() instead.
LKML-Reference: <[email protected]>
--- arch/x86/kernel/cpu/perf_event.c | 2 - arch/x86/kernel/cpu/perf_event_intel_ds.c | 95 ++++++++++++++--------------- 2 files changed, 47 insertions(+), 50 deletions(-)
arch/x86/kernel/cpu/perf_event.c +0 -2
@@ -178,8 +178,6 @@ struct cpu_hw_events {*/ #define INTEL_UEVENT_CONSTRAINT (c, n) \ EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK) -#define PEBS_EVENT_CONSTRAINT (c, n) \ - INTEL_UEVENT_CONSTRAINT(c, n)#define EVENT_CONSTRAINT_END \ EVENT_CONSTRAINT(0, 0, 0)
arch/x86/kernel/cpu/perf_event_intel_ds.c +47 -48
117 lines not on this page · raw message