Skip to content

Commit ac96588

Browse files
Madhavan Srinivasanmpe
authored andcommitted
powerpc/perf: Add blacklisted events for Power9 DD2.2
These events either do not count, or do not count correctly, so to prevent user confusion block counting them at all. Signed-off-by: Madhavan Srinivasan <[email protected]> [mpe: Change log] Signed-off-by: Michael Ellerman <[email protected]>
1 parent 64acab4 commit ac96588

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

arch/powerpc/perf/power9-events-list.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,18 @@ EVENT(PM_RADIX_PWC_L3_HIT, 0x3f056)
8282
EVENT(PM_RUN_CYC_SMT2_MODE, 0x3006c)
8383
EVENT(PM_TM_TX_PASS_RUN_INST, 0x4e014)
8484
EVENT(PM_DISP_HELD_SYNC_HOLD, 0x4003c)
85+
EVENT(PM_DTLB_MISS_16G, 0x1c058)
86+
EVENT(PM_DERAT_MISS_2M, 0x1c05a)
87+
EVENT(PM_DTLB_MISS_2M, 0x1c05c)
88+
EVENT(PM_MRK_DTLB_MISS_1G, 0x1d15c)
89+
EVENT(PM_DTLB_MISS_4K, 0x2c056)
90+
EVENT(PM_DERAT_MISS_1G, 0x2c05a)
91+
EVENT(PM_MRK_DERAT_MISS_2M, 0x2d152)
92+
EVENT(PM_MRK_DTLB_MISS_4K, 0x2d156)
93+
EVENT(PM_MRK_DTLB_MISS_16G, 0x2d15e)
94+
EVENT(PM_DTLB_MISS_64K, 0x3c056)
95+
EVENT(PM_MRK_DERAT_MISS_1G, 0x3d152)
96+
EVENT(PM_MRK_DTLB_MISS_64K, 0x3d156)
97+
EVENT(PM_DTLB_MISS_16M, 0x4c056)
98+
EVENT(PM_DTLB_MISS_1G, 0x4c05a)
99+
EVENT(PM_MRK_DTLB_MISS_16M, 0x4c15e)

arch/powerpc/perf/power9-pmu.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,25 @@ int p9_dd21_bl_ev[] = {
121121
PM_DISP_HELD_SYNC_HOLD,
122122
};
123123

124+
int p9_dd22_bl_ev[] = {
125+
PM_DTLB_MISS_16G,
126+
PM_DERAT_MISS_2M,
127+
PM_DTLB_MISS_2M,
128+
PM_MRK_DTLB_MISS_1G,
129+
PM_DTLB_MISS_4K,
130+
PM_DERAT_MISS_1G,
131+
PM_MRK_DERAT_MISS_2M,
132+
PM_MRK_DTLB_MISS_4K,
133+
PM_MRK_DTLB_MISS_16G,
134+
PM_DTLB_MISS_64K,
135+
PM_MRK_DERAT_MISS_1G,
136+
PM_MRK_DTLB_MISS_64K,
137+
PM_DISP_HELD_SYNC_HOLD,
138+
PM_DTLB_MISS_16M,
139+
PM_DTLB_MISS_1G,
140+
PM_MRK_DTLB_MISS_16M,
141+
};
142+
124143
/* Table of alternatives, sorted by column 0 */
125144
static const unsigned int power9_event_alternatives[][MAX_ALT] = {
126145
{ PM_INST_DISP, PM_INST_DISP_ALT },
@@ -475,6 +494,9 @@ static int __init init_power9_pmu(void)
475494
if ((PVR_CFG(pvr) == 2) && (PVR_MIN(pvr) == 1)) {
476495
power9_pmu.blacklist_ev = p9_dd21_bl_ev;
477496
power9_pmu.n_blacklist_ev = ARRAY_SIZE(p9_dd21_bl_ev);
497+
} else if ((PVR_CFG(pvr) == 2) && (PVR_MIN(pvr) == 2)) {
498+
power9_pmu.blacklist_ev = p9_dd22_bl_ev;
499+
power9_pmu.n_blacklist_ev = ARRAY_SIZE(p9_dd22_bl_ev);
478500
}
479501
}
480502

0 commit comments

Comments
 (0)