File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,16 @@ static int amd_uncore_add(struct perf_event *event, int flags)
158
158
hwc -> event_base_rdpmc = uncore -> rdpmc_base + hwc -> idx ;
159
159
hwc -> state = PERF_HES_UPTODATE | PERF_HES_STOPPED ;
160
160
161
+ /*
162
+ * The first four DF counters are accessible via RDPMC index 6 to 9
163
+ * followed by the L3 counters from index 10 to 15. For processors
164
+ * with more than four DF counters, the DF RDPMC assignments become
165
+ * discontiguous as the additional counters are accessible starting
166
+ * from index 16.
167
+ */
168
+ if (is_nb_event (event ) && hwc -> idx >= NUM_COUNTERS_NB )
169
+ hwc -> event_base_rdpmc += NUM_COUNTERS_L3 ;
170
+
161
171
if (flags & PERF_EF_START )
162
172
amd_uncore_start (event , PERF_EF_RELOAD );
163
173
You can’t perform that action at this time.
0 commit comments