Skip to content

Commit dd267d0

Browse files
captain5050namhyung
authored andcommitted
perf vendor events intel: Add umasks/occ_sel to PCU events.
UMasks were being dropped leading to all PCU UNC_P_POWER_STATE_OCCUPANCY events having the same encoding. Don't drop the umask trying to be consistent with other sources of events like libpfm4 [1]. Older models need to use occ_sel rather than umask, correct these values too. This applies the change from [2]. [1] https://sourceforge.net/p/perfmon2/libpfm4/ci/master/tree/lib/events/intel_skx_unc_pcu_events.h#l30 [2] captain5050/perfmon@cbd4aee Signed-off-by: Ian Rogers <[email protected]> Reviewed-by: Kan Liang <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ec42d3d commit dd267d0

File tree

9 files changed

+27
-0
lines changed

9 files changed

+27
-0
lines changed

tools/perf/pmu-events/arch/x86/broadwellde/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@
394394
"BriefDescription": "Number of cores in C-State; C0 and C1",
395395
"EventCode": "0x80",
396396
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
397+
"Filter": "occ_sel=1",
397398
"PerPkg": "1",
398399
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
399400
"Unit": "PCU"
@@ -402,6 +403,7 @@
402403
"BriefDescription": "Number of cores in C-State; C3",
403404
"EventCode": "0x80",
404405
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
406+
"Filter": "occ_sel=2",
405407
"PerPkg": "1",
406408
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
407409
"Unit": "PCU"
@@ -410,6 +412,7 @@
410412
"BriefDescription": "Number of cores in C-State; C6 and C7",
411413
"EventCode": "0x80",
412414
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
415+
"Filter": "occ_sel=3",
413416
"PerPkg": "1",
414417
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
415418
"Unit": "PCU"

tools/perf/pmu-events/arch/x86/broadwellx/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@
394394
"BriefDescription": "Number of cores in C-State; C0 and C1",
395395
"EventCode": "0x80",
396396
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
397+
"Filter": "occ_sel=1",
397398
"PerPkg": "1",
398399
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
399400
"Unit": "PCU"
@@ -402,6 +403,7 @@
402403
"BriefDescription": "Number of cores in C-State; C3",
403404
"EventCode": "0x80",
404405
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
406+
"Filter": "occ_sel=2",
405407
"PerPkg": "1",
406408
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
407409
"Unit": "PCU"
@@ -410,6 +412,7 @@
410412
"BriefDescription": "Number of cores in C-State; C6 and C7",
411413
"EventCode": "0x80",
412414
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
415+
"Filter": "occ_sel=3",
413416
"PerPkg": "1",
414417
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
415418
"Unit": "PCU"

tools/perf/pmu-events/arch/x86/cascadelakex/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
145145
"PerPkg": "1",
146146
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
147+
"UMask": "0x40",
147148
"Unit": "PCU"
148149
},
149150
{
@@ -152,6 +153,7 @@
152153
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
153154
"PerPkg": "1",
154155
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
156+
"UMask": "0x80",
155157
"Unit": "PCU"
156158
},
157159
{
@@ -160,6 +162,7 @@
160162
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
161163
"PerPkg": "1",
162164
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
165+
"UMask": "0xc0",
163166
"Unit": "PCU"
164167
},
165168
{

tools/perf/pmu-events/arch/x86/haswellx/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@
426426
"BriefDescription": "Number of cores in C-State; C0 and C1",
427427
"EventCode": "0x80",
428428
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
429+
"Filter": "occ_sel=1",
429430
"PerPkg": "1",
430431
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
431432
"Unit": "PCU"
@@ -434,6 +435,7 @@
434435
"BriefDescription": "Number of cores in C-State; C3",
435436
"EventCode": "0x80",
436437
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
438+
"Filter": "occ_sel=2",
437439
"PerPkg": "1",
438440
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
439441
"Unit": "PCU"
@@ -442,6 +444,7 @@
442444
"BriefDescription": "Number of cores in C-State; C6 and C7",
443445
"EventCode": "0x80",
444446
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
447+
"Filter": "occ_sel=3",
445448
"PerPkg": "1",
446449
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
447450
"Unit": "PCU"

tools/perf/pmu-events/arch/x86/icelakex/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
152152
"PerPkg": "1",
153153
"PublicDescription": "Number of cores in C-State : C0 and C1 : This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
154+
"UMask": "0x40",
154155
"Unit": "PCU"
155156
},
156157
{
@@ -159,6 +160,7 @@
159160
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
160161
"PerPkg": "1",
161162
"PublicDescription": "Number of cores in C-State : C3 : This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
163+
"UMask": "0x80",
162164
"Unit": "PCU"
163165
},
164166
{
@@ -167,6 +169,7 @@
167169
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
168170
"PerPkg": "1",
169171
"PublicDescription": "Number of cores in C-State : C6 and C7 : This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
172+
"UMask": "0xc0",
170173
"Unit": "PCU"
171174
},
172175
{

tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@
514514
"BriefDescription": "Number of cores in C-State; C0 and C1",
515515
"EventCode": "0x80",
516516
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
517+
"Filter": "occ_sel=1",
517518
"PerPkg": "1",
518519
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
519520
"Unit": "PCU"
@@ -522,6 +523,7 @@
522523
"BriefDescription": "Number of cores in C-State; C3",
523524
"EventCode": "0x80",
524525
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
526+
"Filter": "occ_sel=2",
525527
"PerPkg": "1",
526528
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
527529
"Unit": "PCU"
@@ -530,6 +532,7 @@
530532
"BriefDescription": "Number of cores in C-State; C6 and C7",
531533
"EventCode": "0x80",
532534
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
535+
"Filter": "occ_sel=3",
533536
"PerPkg": "1",
534537
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
535538
"Unit": "PCU"

tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@
233233
"BriefDescription": "Number of cores in C0",
234234
"EventCode": "0x80",
235235
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
236+
"Filter": "occ_sel=1",
236237
"PerPkg": "1",
237238
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
238239
"Unit": "PCU"
@@ -241,6 +242,7 @@
241242
"BriefDescription": "Number of cores in C0",
242243
"EventCode": "0x80",
243244
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
245+
"Filter": "occ_sel=2",
244246
"PerPkg": "1",
245247
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
246248
"Unit": "PCU"
@@ -249,6 +251,7 @@
249251
"BriefDescription": "Number of cores in C0",
250252
"EventCode": "0x80",
251253
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
254+
"Filter": "occ_sel=3",
252255
"PerPkg": "1",
253256
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in C0. It can be used by itself to get the average number of cores in C0, with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
254257
"Unit": "PCU"

tools/perf/pmu-events/arch/x86/skylakex/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
145145
"PerPkg": "1",
146146
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
147+
"UMask": "0x40",
147148
"Unit": "PCU"
148149
},
149150
{
@@ -152,6 +153,7 @@
152153
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
153154
"PerPkg": "1",
154155
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
156+
"UMask": "0x80",
155157
"Unit": "PCU"
156158
},
157159
{
@@ -160,6 +162,7 @@
160162
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
161163
"PerPkg": "1",
162164
"PublicDescription": "This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
165+
"UMask": "0xc0",
163166
"Unit": "PCU"
164167
},
165168
{

tools/perf/pmu-events/arch/x86/snowridgex/uncore-power.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
151151
"PerPkg": "1",
152152
"PublicDescription": "Number of cores in C-State : C0 and C1 : This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
153+
"UMask": "0x40",
153154
"Unit": "PCU"
154155
},
155156
{
@@ -158,6 +159,7 @@
158159
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
159160
"PerPkg": "1",
160161
"PublicDescription": "Number of cores in C-State : C3 : This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
162+
"UMask": "0x80",
161163
"Unit": "PCU"
162164
},
163165
{
@@ -166,6 +168,7 @@
166168
"EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
167169
"PerPkg": "1",
168170
"PublicDescription": "Number of cores in C-State : C6 and C7 : This is an occupancy event that tracks the number of cores that are in the chosen C-State. It can be used by itself to get the average number of cores in that C-state with thresholding to generate histograms, or with other PCU events and occupancy triggering to capture other details.",
171+
"UMask": "0xc0",
169172
"Unit": "PCU"
170173
},
171174
{

0 commit comments

Comments
 (0)