Commit dd267d05 authored by Ian Rogers's avatar Ian Rogers Committed by Namhyung Kim
Browse files

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] https://github.com/captain5050/perfmon/commit/cbd4aee81023e5bfa09677b1ce170ff69e9c423d



Signed-off-by: default avatarIan Rogers <irogers@google.com>
Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240228170529.4035675-1-irogers@google.com
parent ec42d3d5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -394,6 +394,7 @@
        "BriefDescription": "Number of cores in C-State; C0 and C1",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
        "Filter": "occ_sel=1",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
@@ -402,6 +403,7 @@
        "BriefDescription": "Number of cores in C-State; C3",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
        "Filter": "occ_sel=2",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
@@ -410,6 +412,7 @@
        "BriefDescription": "Number of cores in C-State; C6 and C7",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
        "Filter": "occ_sel=3",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
+3 −0
Original line number Diff line number Diff line
@@ -394,6 +394,7 @@
        "BriefDescription": "Number of cores in C-State; C0 and C1",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
        "Filter": "occ_sel=1",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
@@ -402,6 +403,7 @@
        "BriefDescription": "Number of cores in C-State; C3",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
        "Filter": "occ_sel=2",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
@@ -410,6 +412,7 @@
        "BriefDescription": "Number of cores in C-State; C6 and C7",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
        "Filter": "occ_sel=3",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
+3 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
        "PerPkg": "1",
        "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.",
        "UMask": "0x40",
        "Unit": "PCU"
    },
    {
@@ -152,6 +153,7 @@
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
        "PerPkg": "1",
        "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.",
        "UMask": "0x80",
        "Unit": "PCU"
    },
    {
@@ -160,6 +162,7 @@
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
        "PerPkg": "1",
        "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.",
        "UMask": "0xc0",
        "Unit": "PCU"
    },
    {
+3 −0
Original line number Diff line number Diff line
@@ -426,6 +426,7 @@
        "BriefDescription": "Number of cores in C-State; C0 and C1",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
        "Filter": "occ_sel=1",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
@@ -434,6 +435,7 @@
        "BriefDescription": "Number of cores in C-State; C3",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
        "Filter": "occ_sel=2",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
@@ -442,6 +444,7 @@
        "BriefDescription": "Number of cores in C-State; C6 and C7",
        "EventCode": "0x80",
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
        "Filter": "occ_sel=3",
        "PerPkg": "1",
        "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.",
        "Unit": "PCU"
+3 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C0",
        "PerPkg": "1",
        "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.",
        "UMask": "0x40",
        "Unit": "PCU"
    },
    {
@@ -159,6 +160,7 @@
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C3",
        "PerPkg": "1",
        "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.",
        "UMask": "0x80",
        "Unit": "PCU"
    },
    {
@@ -167,6 +169,7 @@
        "EventName": "UNC_P_POWER_STATE_OCCUPANCY.CORES_C6",
        "PerPkg": "1",
        "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.",
        "UMask": "0xc0",
        "Unit": "PCU"
    },
    {
Loading