Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796236860; b=j0ifbT6/uE2wrq/2xCKndTZ32ShDss9FJmpZQTAv8b+ST4ocu/viBr9RjjVkhSrpM3Fy b6hGtTyrirP3rra3pTe1aXZKfKYC4f6FqmtOifr3fNyfdv0qiUkthCPrnozryxvkqH1tv iikfaWp43wfu86MPy+EGkJR1ouRpVVBxGQRRaP5LWQsuWxH6Ey0VPqPUMTiQR9zLVYHqW kIDW6SkYRSjGD0JsbN36A1YFXfL1D723N54bYqcpnl2OlKQ3o4vbnuxqRzB5aK20JaYuz Q6KDaXW6zCFyfKb7HAZ9WPs0uYvm4JpPoSfHem/PvT+NW9JT7ePjExOydWBdcvIoz+Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796236860; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=6T8othaHg1ITO2RSuqwOcVJQxvQqXk5w3L8fpVMcM28=; b=s4tSGqe4IzKAUIGTdzztPsgQchtSkoEhXZi9aEVQPv5/b56oe4fhX7ePV3M1kde4Ggs2 ZrzBzSE3PHteL1blh+yYPm5loNNFsJKbMNXzZ1kABJqmV0dYA48gsb3AvssJ3cjoIBE2K MdPkg6Y87wk9pk0jMQA4FHcQ/QGEodZHemn4Ih7lE+G1lO+63wgFiF5lSBPRfpdDi5Iw4 EQ/tVlZbDNFyxvCUp9ut6E2qZ9ZsGt/OsvK9ti7v3Lve7lK08aVXiG9qXuC4dzA8dmyCa tGZPe68FAX6ngQdCRoE6f1TeYWj/fwUXXEVjAgtNtJMTL0YZ8Dmrg/RdmiiMZ/BNSMg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=nPN2IUuV; arc=none smtp.remote-ip=74.125.82.199 Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBEEA60A260B for ; Wed, 2 Dec 2026 18:40:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BBEEA60A260B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=nPN2IUuV Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-3869accaac2so92444eec.1 for ; Wed, 02 Dec 2026 10:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796236853; x=1796841653; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6T8othaHg1ITO2RSuqwOcVJQxvQqXk5w3L8fpVMcM28=; b=nPN2IUuVvqPr/CXOySB0NuByUBiMGuOjgrDt1hcUx9iBOj7mSL0qBgtVVfmHJlqKZe Iw3Uv4BOhoMZoLAaWJIpE7ZPDRvWQw9TG0JLMTKD/P+piP5tq7zSC+uL2/n4Cz2HwdCQ +DzxRg5JcU634mjsS7SeLJZB1G4DvsjP92zOwf0QU1HfVmkPuGhrDZ1q6MKI7pAKvOUx WBDfdwaEPuJ7hSclcNWNR9RSCI/k3lTty9Cd9C+k55+qy26UI6plO0CaYOMfpAkT8K8g +5szuAmu6Mx9r8KgMh7kePSa6vOTPp0qZOJNZosG0LEOv5ME9x7PK+LWfnCujtOgHa/r KgfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796236853; x=1796841653; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6T8othaHg1ITO2RSuqwOcVJQxvQqXk5w3L8fpVMcM28=; b=yAw8xsy2JTSP+N8iU8OvLnz/dyHisC1ueTWowffrC6GFmIAAhHWR45geuhFZFKPeD+ W/Yy/dAvPDkS60M6+0gxW/zlgdFGun7sdGPrwFkj5M7KwLI7FotNZqZBJ/ZCbBaQzT8N BXltUIa7OjV7jVrkwXeFRXvlF+gL4SJfEbkcvs33IpyyTowTb4tfZj04V6m2974L27ki Pzu3ovGFyAJS7MW8eqlpgdXQw1Uh0EhoFwvabdjt57lzEBk644TbA/7IU5q3/pOq85/Y 7XePDe9d8kmOZ4qAozrdAduLU4PSgT4G1GXMpgSPu6JAu0VKhuxECn4xemvazWBbZLiq 1RCA== X-Forwarded-Encrypted: i=1; AL+hErEn3spkoYK3RCr5+FZHBiGuJZy5Zd1cp+10JXpT88n2J2MO81Sigltb7kCod/xnlbOPW5GWge9BEj12ujwdp1tc@vger.kernel.org X-Gm-Message-State: APuU4Z/3++W6UaqrY0UPJ/iOq5YacxMKEhGzH7Us9wCJqm44+M+teLT+ 0ztq/rBIqObP6eqPXig8iUXBhzQ1gfwTkb2bhI8GNbdrGXqV6VKJRkYp43LuO3wIq+iqXpjqTHv GeGyYLSZB8w== X-Received: from dycnh14.prod.google.com ([2002:a05:7300:ce8e:b0:36a:17c6:6824]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7300:50fa:b0:383:9f52:e54d with SMTP id 5a478bee46e88-3856ff52e83mr42664272eec.8.1796236852222; Wed, 02 Dec 2026 10:40:52 -0800 (PST) Date: Wed, 2 Dec 2026 10:40:06 -0800 In-Reply-To: X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: Subject: [PATCH v2 01/36] perf jevents: Map cpu_lowpower unit and handle uppercase 0X hex values From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , James Clark Cc: Dapeng Mi , Zide Chen , Thomas Falcon , Chun-Tse Shao , Lalit Maganti , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Ian Rogers Content-Type: text/plain; charset="UTF-8" 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") Reviewed-by: Dapeng Mi Signed-off-by: Ian Rogers --- 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: -- 2.56.1.915.g69d5ec7298-goog