From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796236858; b=QvCn6UUv9Tv54D8o9RUM0o/5uQeouOG3yCCZ+BRhGFdlVqokI11eyU9O9xcxECkDYSse W/KbZCwjJt6gkYRp8pvON4umDxV/z1h2Fo9hK7JyYWiAWdSA4hrkhEA99rVp3qq8+Pxi6 HltZWGeKPDWVG3BryhtWm+N44XFOMj6LzN0T6FSA0QicO6AqY1hk/2PHlsyiA7Did4uwL 4p2eUd0zrTy+42TA+JrMnOA79wno/cJxybw2H7RVDYT//BhqL5vN6IUFB8JRxhmHd4EYU U217JHYXP7pIBbnYSgnzPyEgOzJhSie5l6icQn4n/fQWcZs+93KLeMLW5mrgWS7HiFA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796236858; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:Mime-Version: X-Mailer:Message-ID:Subject:From:To:Cc:Content-Type; bh=CvihRL+iIZ4M11hFkv7jyL1onCWNcTmsXiP4GTnYB2s=; b=UOAwVdrNi3NlusTXCNA2L8ytzLHbXY5XHxJwhefdQ2qiCoQGti2V9aTUl++j3m81H0A1 0dFfISMwiY9aN9w+Yyncu4/R21JPDjDuYpeVkPlygxRnf2WIJYVpmOIbyPPaN0p2NHy3J BZMs5dAiovYT0Ll/5eiY3BrP5Jselb+8ovDhxMZa4p/pBypAxH5jN2ggq90ScQnGkmnH+ UC7mITDY3ejNOXykSOaRByaPRfwClWtZsqP+GcF5M64Z/z0oIRQwrh90swdbaqOdqcT0e mU0tXENakGWaQM6ujGj+WPbOeHOKT13Jxktyx77m/j3u+Gl2eIsnbjepbm6qFqBQnaw== 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=Fj4wW1xl; arc=none smtp.remote-ip=209.85.161.71 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (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 EBF66606A6B7 for ; Wed, 2 Dec 2026 18:40:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EBF66606A6B7 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=Fj4wW1xl Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-7150e6da54bso12830497eaf.1 for ; Wed, 02 Dec 2026 10:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796236851; x=1796841651; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:mime-version:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=CvihRL+iIZ4M11hFkv7jyL1onCWNcTmsXiP4GTnYB2s=; b=Fj4wW1xlXYGemzly6fbKWstOkYyr797O8aSZi/WpDQ/DxJD44jiBiA9/T2qGVsjSSP GvRZJKRiwmxpCHY7zKC1qXk5jno3sp9uwJvXSKXUrN7r+303wHEGjmZ3wo546tAtkQ1S +2fjHWeKwvipdP8uRkfBmlpCYjsei5XWwdpW3xqUIQ39QGdBnFUARrGlIoVo0q+gs9/S OCKLjh1SDwIbJbJiEKBm7Vy4NJK7OR0OtnKv0/M1UgAIVO90elrtKwTs1Rle9JO9qwv0 lG7IadbAfDjVai8l7d67rb7I6mJAV//nLq1kEDpeFvNe5Jz4Q6lpjs8+YRzsejHGqY62 gD/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796236851; x=1796841651; h=content-type:cc:to:from:subject:message-id:mime-version:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=CvihRL+iIZ4M11hFkv7jyL1onCWNcTmsXiP4GTnYB2s=; b=V/Li28Hbsj7rswYJEYr/NGkGRUPIcaTsbphoFrhF5BZXJGN/fVJEOdntVKudUGcjwQ v6+rRYZELRQGuTCep51CGBBJAJ0LOB5yJINj7HXtsrxSw9kD1Fmh78xtN3/Pco/MzhJr aCDca/0MEkX9MiiUUWmsdzasi/YkFDp4emNZfMZKgH9xvV4Q1o4Un8rLrlUZN8qwOQhw jBMXuaB2/n88Ztb8VxuTwFpKyP3++R9kiFBsdZSx05jBATIRL6rjHI/P+UM32ModZn2w 8chVl/08qZTDuAhze/jCBIpsKSnzAv0+8uYFxZbsIsb7hltLAXJpI6VwY5lYQ4VaJg2S DEgQ== X-Forwarded-Encrypted: i=1; AL+hErEWefTc1DO+h/s1365VPUDLWDhc1J9r671/ZI4tcxOWPkdK07KqvXsHHSXSMmVdkIPBL3V41jAJNsIt2OA=@vger.kernel.org X-Gm-Message-State: APuU4Z+4aJvxmxeTyNu6n5sxPD9puNE08AwEGrjeIzBs4Dm+y7A3I8H6 v/c1ZQJfxDEfW7+Etp3jgopL5P54tuoNtlMYEXl6gVhpPRwBiSFHpjXF6+bFXq5joV1WdjiUvzu dd/7EJyurPQ== X-Received: from oocjp10-n2.prod.google.com ([2002:a05:6820:a70a:20b0:71b:7aca:1ed]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6820:162b:b0:71b:c1a8:b814 with SMTP id 006d021491bc7-71bc1a8c310mr7306479eaf.35.1796236849973; Wed, 02 Dec 2026 10:40:49 -0800 (PST) Date: Wed, 2 Dec 2026 10:40:05 -0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: Subject: [PATCH v2 00/36] perf pmu-events: Intel event/metric fixes and TMA 5.32 updates 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" This series updates jevents.py, metric.py, and the Intel x86 vendor event/metric JSON tables across 33 models. Changes in v2 (v1: https://lore.kernel.org/linux-perf-users/cover.1796199085.git.irogers@google.com/): - Add Reviewed-by: Dapeng Mi to patch 1. - Fix Fixes: tags on broadwellx (patch 9), haswellx (patch 18), ivytown (patch 22), and jaketown (patch 23) per Sashiko AI review to cite the commits that stripped ExtSel and QPI_*_BANDWIDTH_TX rather than the earlier commits that added them. - Add matching Fixes: tags on cascadelakex (patch 10) and skylakex (patch 34) for the commits that dropped UPI_DATA_BANDWIDTH_TX. - No code or JSON changes from v1. Patches 1-3 fix pmu-events tooling bugs and clean up obsolete logic: - Map "cpu_lowpower" in jevents.py (matching arch/x86/events/intel/core.c) and accept uppercase "0X" hex prefixes in is_zero()/canonicalize_value(). - Fix constant folding and Function.Equals() bugs in metric.py and add unit tests. - Remove the obsolete "0 * slots" simplification exception in metric.py now that parse-events.c automatically injects slots for Intel topdown metric events (commit 8dcd27b1b866). Patches 4-36 re-generate Intel vendor events and metrics per model using the updated intel/perfmon create_perf_json.py scripts (pushed to https://github.com/captain5050/perfmon/tree/create-perf-json-fixes): - Update TMA metrics to v5.32 (TMA_Metrics-full.csv v5.3-full / 5.320-full) across 24 models and add Diamond Rapids TMA/cstate metrics. - Bring in upstream event releases for Emerald Rapids (v1.26) and Sapphire Rapids (v1.41). - Align uncore PMU unit names and event encodings with arch/x86/events/intel/ drivers (HAC_CBOX, MDF_SBO, DMR cbo and CXLCM port_en=0xf, KNL iMC, QPI ExtSel, lowercase 0x hex normalization, mixed-case QPI/UPI bandwidth events, zero-valued PortMask/FCMask cleanup, and counter.json count initialization). - Align cstate metrics with arch/x86/events/intel/cstate.c (including cstate_module), escape '=' in hybrid msr@tsc\,cpu\=@ expressions, adopt aggr_nr() for uncore frequency/occupancy metrics, drop bogus "Available PDIST counters" text on non-precise events, filter TMA Related metrics / Sample-with references to available entries, and prune unused metric groups from metricgroups.json. Tested with metric_test.py, mypy, checkpatch.pl, and `perf test` as root on an Intel Core i7-14700 (GenuineIntel-6-B7-1): all 104 PMU JSON event tests, x86 topdown tests, jevents unknown-key check, perf all PMU test, perf all metricgroups test, perf all metrics test, and perf metrics value validation passed. Ian Rogers (36): perf jevents: Map cpu_lowpower unit and handle uppercase 0X hex values perf pmu-events: Fix Simplify() and Equals() bugs in metric.py perf pmu-events: Remove 0 * slots simplification exception in metric.py perf vendor events intel: Update alderlake events and TMA metrics to 5.32 perf vendor events intel: Update alderlaken events and metrics perf vendor events intel: Update arrowlake events and TMA metrics to 5.32 perf vendor events intel: Update broadwell events and TMA metrics to 5.32 perf vendor events intel: Update broadwellde metrics to TMA 5.32 perf vendor events intel: Update broadwellx events and TMA metrics to 5.32 perf vendor events intel: Update cascadelakex events and TMA metrics to 5.32 perf vendor events intel: Update clearwaterforest events and metrics perf vendor events intel: Add diamondrapids TMA 5.32 metrics and update events perf vendor events intel: Update elkhartlake events perf vendor events intel: Update emeraldrapids events to 1.26 and TMA metrics to 5.32 perf vendor events intel: Update grandridge events and metrics perf vendor events intel: Update graniterapids events and TMA metrics to 5.32 perf vendor events intel: Update haswell events and TMA metrics to 5.32 perf vendor events intel: Update haswellx events and TMA metrics to 5.32 perf vendor events intel: Update icelake events and TMA metrics to 5.32 perf vendor events intel: Update icelakex events and TMA metrics to 5.32 perf vendor events intel: Update ivybridge metrics to TMA 5.32 perf vendor events intel: Update ivytown events and TMA metrics to 5.32 perf vendor events intel: Update jaketown events and TMA metrics to 5.32 perf vendor events intel: Update knightslanding events perf vendor events intel: Update lunarlake events and TMA metrics to 5.32 perf vendor events intel: Update meteorlake events and TMA metrics to 5.32 perf vendor events intel: Update novalake events perf vendor events intel: Update pantherlake events perf vendor events intel: Update rocketlake events and TMA metrics to 5.32 perf vendor events intel: Update sandybridge metrics to TMA 5.32 perf vendor events intel: Update sapphirerapids events to 1.41 and TMA metrics to 5.32 perf vendor events intel: Update sierraforest events and metrics perf vendor events intel: Update skylake events and TMA metrics to 5.32 perf vendor events intel: Update skylakex events and TMA metrics to 5.32 perf vendor events intel: Update snowridgex events perf vendor events intel: Update tigerlake events and TMA metrics to 5.32 .../arch/x86/alderlake/adl-metrics.json | 62 +- .../pmu-events/arch/x86/alderlake/cache.json | 29 - .../pmu-events/arch/x86/alderlake/memory.json | 13 - .../arch/x86/alderlake/metricgroups.json | 5 - .../pmu-events/arch/x86/alderlake/other.json | 4 - .../pmu-events/arch/x86/alderlaken/cache.json | 21 - .../arch/x86/alderlaken/memory.json | 10 - .../arch/x86/alderlaken/metricgroups.json | 1 - .../pmu-events/arch/x86/alderlaken/other.json | 3 - .../arch/x86/arrowlake/arl-metrics.json | 80 +- .../pmu-events/arch/x86/arrowlake/cache.json | 8 - .../pmu-events/arch/x86/arrowlake/memory.json | 3 - .../arch/x86/arrowlake/metricgroups.json | 8 - .../pmu-events/arch/x86/arrowlake/other.json | 4 - .../arch/x86/arrowlake/uncore-cache.json | 4 +- .../arch/x86/broadwell/bdw-metrics.json | 53 +- .../arch/x86/broadwell/counter.json | 2 +- .../arch/x86/broadwell/metricgroups.json | 14 - .../arch/x86/broadwellde/bdwde-metrics.json | 105 +- .../arch/x86/broadwellde/metricgroups.json | 14 - .../arch/x86/broadwellx/bdx-metrics.json | 59 +- .../arch/x86/broadwellx/metricgroups.json | 12 - .../arch/x86/broadwellx/uncore-cache.json | 2 +- .../x86/broadwellx/uncore-interconnect.json | 140 ++ .../arch/x86/cascadelakex/clx-metrics.json | 68 +- .../arch/x86/cascadelakex/metricgroups.json | 3 - .../arch/x86/cascadelakex/uncore-cache.json | 24 +- .../x86/cascadelakex/uncore-interconnect.json | 11 + .../arch/x86/cascadelakex/uncore-io.json | 2 - .../arch/x86/clearwaterforest/cache.json | 2 - .../arch/x86/clearwaterforest/counter.json | 14 +- .../x86/clearwaterforest/cwf-metrics.json | 15 +- .../arch/x86/clearwaterforest/memory.json | 5 - .../x86/clearwaterforest/uncore-cache.json | 4 - .../arch/x86/clearwaterforest/uncore-cxl.json | 1 - .../clearwaterforest/uncore-interconnect.json | 2 +- .../arch/x86/clearwaterforest/uncore-io.json | 26 - .../arch/x86/diamondrapids/counter.json | 2 +- .../arch/x86/diamondrapids/dmr-metrics.json | 2166 +++++++++++++++++ .../arch/x86/diamondrapids/memory.json | 3 - .../arch/x86/diamondrapids/metricgroups.json | 142 ++ .../arch/x86/diamondrapids/other.json | 46 - .../arch/x86/diamondrapids/uncore-cache.json | 58 +- .../arch/x86/diamondrapids/uncore-cxl.json | 6 +- .../arch/x86/elkhartlake/cache.json | 261 +- .../arch/x86/elkhartlake/memory.json | 171 +- .../arch/x86/elkhartlake/other.json | 30 +- .../arch/x86/emeraldrapids/cache.json | 38 - .../arch/x86/emeraldrapids/emr-metrics.json | 75 +- .../arch/x86/emeraldrapids/memory.json | 29 +- .../arch/x86/emeraldrapids/metricgroups.json | 3 - .../arch/x86/emeraldrapids/other.json | 1 - .../arch/x86/emeraldrapids/uncore-cache.json | 51 +- .../emeraldrapids/uncore-interconnect.json | 62 +- .../arch/x86/emeraldrapids/uncore-io.json | 70 +- .../arch/x86/emeraldrapids/uncore-memory.json | 90 - .../pmu-events/arch/x86/grandridge/cache.json | 5 - .../arch/x86/grandridge/grr-metrics.json | 43 +- .../arch/x86/grandridge/memory.json | 2 - .../pmu-events/arch/x86/grandridge/other.json | 1 - .../arch/x86/grandridge/uncore-cache.json | 3 - .../arch/x86/grandridge/uncore-io.json | 13 - .../arch/x86/graniterapids/cache.json | 35 - .../arch/x86/graniterapids/counter.json | 12 +- .../arch/x86/graniterapids/gnr-metrics.json | 69 +- .../arch/x86/graniterapids/memory.json | 19 - .../arch/x86/graniterapids/metricgroups.json | 3 - .../arch/x86/graniterapids/other.json | 1 - .../arch/x86/graniterapids/uncore-cache.json | 4 - .../arch/x86/graniterapids/uncore-cxl.json | 1 - .../graniterapids/uncore-interconnect.json | 74 +- .../arch/x86/graniterapids/uncore-io.json | 26 - .../pmu-events/arch/x86/haswell/counter.json | 2 +- .../arch/x86/haswell/hsw-metrics.json | 45 +- .../arch/x86/haswell/metricgroups.json | 21 - .../arch/x86/haswellx/hsx-metrics.json | 53 +- .../arch/x86/haswellx/metricgroups.json | 19 - .../arch/x86/haswellx/uncore-cache.json | 2 +- .../x86/haswellx/uncore-interconnect.json | 140 ++ .../pmu-events/arch/x86/icelake/counter.json | 2 +- .../arch/x86/icelake/icl-metrics.json | 45 +- .../arch/x86/icelake/metricgroups.json | 5 - .../pmu-events/arch/x86/icelakex/counter.json | 2 +- .../arch/x86/icelakex/icx-metrics.json | 59 +- .../arch/x86/icelakex/metricgroups.json | 3 - .../arch/x86/ivybridge/ivb-metrics.json | 53 +- .../arch/x86/ivybridge/metricgroups.json | 17 - .../arch/x86/ivytown/ivt-metrics.json | 67 +- .../arch/x86/ivytown/metricgroups.json | 15 - .../arch/x86/ivytown/uncore-interconnect.json | 169 ++ .../arch/x86/jaketown/jkt-metrics.json | 38 +- .../arch/x86/jaketown/metricgroups.json | 37 +- .../x86/jaketown/uncore-interconnect.json | 48 + .../arch/x86/knightslanding/counter.json | 4 +- .../x86/knightslanding/uncore-memory.json | 8 +- .../pmu-events/arch/x86/lunarlake/cache.json | 15 - .../arch/x86/lunarlake/lnl-metrics.json | 67 +- .../pmu-events/arch/x86/lunarlake/memory.json | 9 - .../arch/x86/lunarlake/metricgroups.json | 8 - .../pmu-events/arch/x86/lunarlake/other.json | 5 - tools/perf/pmu-events/arch/x86/mapfile.csv | 4 +- .../pmu-events/arch/x86/meteorlake/cache.json | 21 - .../arch/x86/meteorlake/memory.json | 9 - .../arch/x86/meteorlake/metricgroups.json | 5 - .../arch/x86/meteorlake/mtl-metrics.json | 64 +- .../pmu-events/arch/x86/meteorlake/other.json | 4 - .../arch/x86/meteorlake/uncore-cache.json | 4 +- .../pmu-events/arch/x86/novalake/counter.json | 2 +- .../pmu-events/arch/x86/novalake/memory.json | 3 - .../pmu-events/arch/x86/novalake/other.json | 14 - .../arch/x86/pantherlake/cache.json | 10 - .../arch/x86/pantherlake/counter.json | 2 +- .../arch/x86/pantherlake/memory.json | 6 - .../arch/x86/pantherlake/other.json | 1 - .../arch/x86/rocketlake/counter.json | 2 +- .../arch/x86/rocketlake/metricgroups.json | 5 - .../arch/x86/rocketlake/rkl-metrics.json | 45 +- .../arch/x86/sandybridge/metricgroups.json | 37 +- .../arch/x86/sandybridge/snb-metrics.json | 32 +- .../arch/x86/sapphirerapids/cache.json | 43 - .../arch/x86/sapphirerapids/memory.json | 29 +- .../arch/x86/sapphirerapids/metricgroups.json | 3 - .../arch/x86/sapphirerapids/other.json | 1 - .../arch/x86/sapphirerapids/spr-metrics.json | 71 +- .../arch/x86/sapphirerapids/uncore-cache.json | 39 +- .../sapphirerapids/uncore-interconnect.json | 62 +- .../arch/x86/sapphirerapids/uncore-io.json | 70 +- .../x86/sapphirerapids/uncore-memory.json | 90 - .../arch/x86/sierraforest/cache.json | 5 - .../arch/x86/sierraforest/memory.json | 4 - .../arch/x86/sierraforest/other.json | 1 - .../arch/x86/sierraforest/srf-metrics.json | 41 +- .../arch/x86/sierraforest/uncore-cache.json | 4 - .../arch/x86/sierraforest/uncore-cxl.json | 1 - .../x86/sierraforest/uncore-interconnect.json | 2 +- .../arch/x86/sierraforest/uncore-io.json | 26 - .../pmu-events/arch/x86/skylake/counter.json | 2 +- .../arch/x86/skylake/metricgroups.json | 7 - .../arch/x86/skylake/skl-metrics.json | 54 +- .../arch/x86/skylakex/metricgroups.json | 4 - .../arch/x86/skylakex/skx-metrics.json | 58 +- .../arch/x86/skylakex/uncore-cache.json | 24 +- .../x86/skylakex/uncore-interconnect.json | 11 + .../arch/x86/skylakex/uncore-io.json | 2 - .../pmu-events/arch/x86/snowridgex/cache.json | 261 +- .../arch/x86/snowridgex/counter.json | 2 +- .../arch/x86/snowridgex/memory.json | 171 +- .../pmu-events/arch/x86/snowridgex/other.json | 30 +- .../arch/x86/snowridgex/uncore-io.json | 2 - .../arch/x86/tigerlake/counter.json | 2 +- .../arch/x86/tigerlake/metricgroups.json | 5 - .../arch/x86/tigerlake/tgl-metrics.json | 45 +- tools/perf/pmu-events/jevents.py | 5 +- tools/perf/pmu-events/metric.py | 55 +- tools/perf/pmu-events/metric_test.py | 43 +- 155 files changed, 4261 insertions(+), 2690 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/diamondrapids/dmr-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/diamondrapids/metricgroups.json base-commit: 419442c00c667d33e27db4fef9733fa966e6a149 -- 2.56.1.915.g69d5ec7298-goog