mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Zide Chen <zide.chen@intel.com>,
	Thomas Falcon <thomas.falcon@intel.com>,
	Chun-Tse Shao <ctshao@google.com>,
	Lalit Maganti <lalitmaganti@gmail.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sandipan Das <sandipan.das@amd.com>
Subject: Re: [PATCH 01/36] perf jevents: Map cpu_lowpower unit and handle uppercase 0X hex values
Date: Wed, 2 Dec 2026 17:36:44 +0800	[thread overview]
Message-ID: <bca3d06e-8825-41f0-9188-c3f28ac5d8cb@linux.intel.com> (raw)
In-Reply-To: <5befc9386d80158e2437ff506a50ac20389427af.1796199085.git.irogers@google.com>

LGTM. Thanks.

Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>

On 12/2/2026 4:20 PM, Ian Rogers wrote:
> Arrow Lake event tables use "Unit": "cpu_lowpower", matching the
> kernel PMU name registered in arch/x86/events/intel/core.c, but
> unit_to_pmu() only listed cpu_core and cpu_atom, causing cpu_lowpower
> events to be emitted with PMU name uncore_cpu_lowpower.
>
> Add 'cpu_lowpower' to unit_to_pmu()'s table, and accept uppercase '0X'
> hex prefixes alongside '0x' in is_zero() and canonicalize_value().
>
> Fixes: ba56a910635a ("perf vendor events: Add Arrowlake events/metrics")
> Fixes: b8db070f389c ("perf jevents: Drop or simplify small integer values")
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/pmu-events/jevents.py | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
> index 34325e6d7e05..0a361b9bd8be 100755
> --- a/tools/perf/pmu-events/jevents.py
> +++ b/tools/perf/pmu-events/jevents.py
> @@ -313,6 +313,7 @@ class JsonEvent:
>            'UMCPMC': 'amd_umc',
>            'cpu_core': 'cpu_core',
>            'cpu_atom': 'cpu_atom',
> +          'cpu_lowpower': 'cpu_lowpower',
>            'ali_drw': 'ali_drw',
>            'arm_cmn': 'arm_cmn',
>            'software': 'software',
> @@ -322,7 +323,7 @@ class JsonEvent:
>  
>      def is_zero(val: str) -> bool:
>        try:
> -        if val.startswith('0x'):
> +        if val.startswith(('0x', '0X')):
>            return int(val, 16) == 0
>          else:
>            return int(val) == 0
> @@ -331,7 +332,7 @@ class JsonEvent:
>  
>      def canonicalize_value(val: str) -> str:
>        try:
> -        if val.startswith('0x'):
> +        if val.startswith(('0x', '0X')):
>            return llx(int(val, 16))
>          return str(int(val))
>        except ValueError:

  reply	other threads:[~2026-12-02  9:36 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  8:20 [PATCH 00/36] perf pmu-events: Intel event/metric fixes and TMA 5.32 updates Ian Rogers
2026-12-02  8:20 ` [PATCH 01/36] perf jevents: Map cpu_lowpower unit and handle uppercase 0X hex values Ian Rogers
2026-12-02  9:36   ` Mi, Dapeng [this message]
2026-12-02  8:20 ` [PATCH 02/36] perf pmu-events: Fix Simplify() and Equals() bugs in metric.py Ian Rogers
2026-12-02  8:20 ` [PATCH 03/36] perf pmu-events: Remove 0 * slots simplification exception " Ian Rogers
2026-12-02  8:20 ` [PATCH 04/36] perf vendor events intel: Update alderlake events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:20 ` [PATCH 05/36] perf vendor events intel: Update alderlaken events and metrics Ian Rogers
2026-12-02  8:20 ` [PATCH 06/36] perf vendor events intel: Update arrowlake events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:20 ` [PATCH 07/36] perf vendor events intel: Update broadwell " Ian Rogers
2026-12-02  8:20 ` [PATCH 08/36] perf vendor events intel: Update broadwellde metrics to TMA 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 09/36] perf vendor events intel: Update broadwellx events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 10/36] perf vendor events intel: Update cascadelakex " Ian Rogers
2026-12-02  8:21 ` [PATCH 11/36] perf vendor events intel: Update clearwaterforest events and metrics Ian Rogers
2026-12-02  8:21 ` [PATCH 12/36] perf vendor events intel: Add diamondrapids TMA 5.32 metrics and update events Ian Rogers
2026-12-02  8:21 ` [PATCH 13/36] perf vendor events intel: Update elkhartlake events Ian Rogers
2026-12-02  8:21 ` [PATCH 14/36] perf vendor events intel: Update emeraldrapids events to 1.26 and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 15/36] perf vendor events intel: Update grandridge events and metrics Ian Rogers
2026-12-02  8:21 ` [PATCH 16/36] perf vendor events intel: Update graniterapids events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 17/36] perf vendor events intel: Update haswell " Ian Rogers
2026-12-02  8:21 ` [PATCH 18/36] perf vendor events intel: Update haswellx " Ian Rogers
2026-12-02  8:21 ` [PATCH 19/36] perf vendor events intel: Update icelake " Ian Rogers
2026-12-02  8:21 ` [PATCH 20/36] perf vendor events intel: Update icelakex " Ian Rogers
2026-12-02  8:21 ` [PATCH 21/36] perf vendor events intel: Update ivybridge metrics to TMA 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 22/36] perf vendor events intel: Update ivytown events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 23/36] perf vendor events intel: Update jaketown " Ian Rogers
2026-12-02  8:21 ` [PATCH 24/36] perf vendor events intel: Update knightslanding events Ian Rogers
2026-12-02  8:21 ` [PATCH 25/36] perf vendor events intel: Update lunarlake events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 26/36] perf vendor events intel: Update meteorlake " Ian Rogers
2026-12-02  8:21 ` [PATCH 27/36] perf vendor events intel: Update novalake events Ian Rogers
2026-12-02  8:21 ` [PATCH 28/36] perf vendor events intel: Update pantherlake events Ian Rogers
2026-12-02  8:21 ` [PATCH 29/36] perf vendor events intel: Update rocketlake events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 30/36] perf vendor events intel: Update sandybridge metrics to TMA 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 31/36] perf vendor events intel: Update sapphirerapids events to 1.41 and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 32/36] perf vendor events intel: Update sierraforest events and metrics Ian Rogers
2026-12-02  8:21 ` [PATCH 33/36] perf vendor events intel: Update skylake events and TMA metrics to 5.32 Ian Rogers
2026-12-02  8:21 ` [PATCH 34/36] perf vendor events intel: Update skylakex " Ian Rogers
2026-12-02  8:21 ` [PATCH 35/36] perf vendor events intel: Update snowridgex events Ian Rogers
2026-12-02  8:21 ` [PATCH 36/36] perf vendor events intel: Update tigerlake events and TMA metrics to 5.32 Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bca3d06e-8825-41f0-9188-c3f28ac5d8cb@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ctshao@google.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=lalitmaganti@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sandipan.das@amd.com \
    --cc=thomas.falcon@intel.com \
    --cc=zide.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®