lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b2ff06f-099c-424a-97b5-fdf638892e41@linux.intel.com>
Date: Tue, 27 Feb 2024 09:12:54 -0500
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Ian Rogers <irogers@...gle.com>, Peter Zijlstra <peterz@...radead.org>,
 Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
 linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf vendor events intel: Add umasks to PCU events.



On 2024-02-26 3:15 p.m., Ian Rogers wrote:
> 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]. 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/661a229996493448095fb55415ed568ceabc631b
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---

Thanks Ian.

Reviewed-by: Kan Liang <kan.liang@...ux.intel.com>

Thanks,
Kan

>  tools/perf/pmu-events/arch/x86/broadwellde/uncore-power.json  | 3 +++
>  tools/perf/pmu-events/arch/x86/broadwellx/uncore-power.json   | 3 +++
>  tools/perf/pmu-events/arch/x86/cascadelakex/uncore-power.json | 3 +++
>  tools/perf/pmu-events/arch/x86/haswellx/uncore-power.json     | 3 +++
>  tools/perf/pmu-events/arch/x86/icelakex/uncore-power.json     | 3 +++
>  tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json      | 3 +++
>  tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json     | 3 +++
>  tools/perf/pmu-events/arch/x86/skylakex/uncore-power.json     | 3 +++
>  tools/perf/pmu-events/arch/x86/snowridgex/uncore-power.json   | 3 +++
>  9 files changed, 27 insertions(+)
> 
> diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/uncore-power.json b/tools/perf/pmu-events/arch/x86/broadwellde/uncore-power.json
> index 83d20130c217..9a0bc34c08e1 100644
> --- a/tools/perf/pmu-events/arch/x86/broadwellde/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/broadwellde/uncore-power.json
> @@ -396,6 +396,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"
>      },
>      {
> @@ -404,6 +405,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"
>      },
>      {
> @@ -412,6 +414,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"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/uncore-power.json b/tools/perf/pmu-events/arch/x86/broadwellx/uncore-power.json
> index 83d20130c217..9a0bc34c08e1 100644
> --- a/tools/perf/pmu-events/arch/x86/broadwellx/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/broadwellx/uncore-power.json
> @@ -396,6 +396,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"
>      },
>      {
> @@ -404,6 +405,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"
>      },
>      {
> @@ -412,6 +414,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"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/cascadelakex/uncore-power.json b/tools/perf/pmu-events/arch/x86/cascadelakex/uncore-power.json
> index c6254af7a468..ceef46046488 100644
> --- a/tools/perf/pmu-events/arch/x86/cascadelakex/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/cascadelakex/uncore-power.json
> @@ -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"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/haswellx/uncore-power.json b/tools/perf/pmu-events/arch/x86/haswellx/uncore-power.json
> index daebf1050acb..15097511cbd8 100644
> --- a/tools/perf/pmu-events/arch/x86/haswellx/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/haswellx/uncore-power.json
> @@ -428,6 +428,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"
>      },
>      {
> @@ -436,6 +437,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"
>      },
>      {
> @@ -444,6 +446,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"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/icelakex/uncore-power.json b/tools/perf/pmu-events/arch/x86/icelakex/uncore-power.json
> index ee4dac6fc797..920cab6ffe37 100644
> --- a/tools/perf/pmu-events/arch/x86/icelakex/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/icelakex/uncore-power.json
> @@ -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"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json b/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
> index 5df1ebfb89ea..4dac5810324b 100644
> --- a/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
> @@ -516,6 +516,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"
>      },
>      {
> @@ -524,6 +525,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"
>      },
>      {
> @@ -532,6 +534,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"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json b/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
> index b3ee5d741015..a83e07dce947 100644
> --- a/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
> @@ -235,6 +235,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 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.",
> +        "UMask": "0x40",
>          "Unit": "PCU"
>      },
>      {
> @@ -243,6 +244,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 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.",
> +        "UMask": "0x80",
>          "Unit": "PCU"
>      },
>      {
> @@ -251,6 +253,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 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.",
> +        "UMask": "0xc0",
>          "Unit": "PCU"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/skylakex/uncore-power.json b/tools/perf/pmu-events/arch/x86/skylakex/uncore-power.json
> index c6254af7a468..ceef46046488 100644
> --- a/tools/perf/pmu-events/arch/x86/skylakex/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/skylakex/uncore-power.json
> @@ -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"
>      },
>      {
> diff --git a/tools/perf/pmu-events/arch/x86/snowridgex/uncore-power.json b/tools/perf/pmu-events/arch/x86/snowridgex/uncore-power.json
> index a61ffca2dfea..dcf268467db9 100644
> --- a/tools/perf/pmu-events/arch/x86/snowridgex/uncore-power.json
> +++ b/tools/perf/pmu-events/arch/x86/snowridgex/uncore-power.json
> @@ -150,6 +150,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"
>      },
>      {
> @@ -158,6 +159,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"
>      },
>      {
> @@ -166,6 +168,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"
>      },
>      {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ