Skip to content

Commit 10003ff

Browse files
committed
Merge tag 'turbostat-v2025.12.02' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull turbostat updates from Len Brown: - Add LLC statistics columns: LLCkRPS = Last Level Cache Thousands of References Per Second LLC%hit = Last Level Cache Hit % - Recognize Wildcat Lake and Nova Lake platforms - Add MSR check for Android - Add APERF check for VMWARE - Add RAPL check for AWS - Minor fixes to turbostat (and x86_energy_perf_policy) * tag 'turbostat-v2025.12.02' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (21 commits) tools/power turbostat: version 2025.12.02 tools/power turbostat: Print wide names only for RAW 64-bit columns tools/power turbostat: Print percentages in 8-columns tools/power turbostat: Print "nan" for out of range percentages tools/power turbostat: Validate APERF access for VMWARE tools/power turbostat: Enhance perf probe tools/power turbostat: Validate RAPL MSRs for AWS Nitro Hypervisor tools/power x86_energy_perf_policy: Fix potential NULL pointer dereference tools/power x86_energy_perf_policy: Fix format string in error message tools/power x86_energy_perf_policy: Simplify Android MSR probe tools/power x86_energy_perf_policy: Add Android MSR device support tools/power turbostat: Add run-time MSR driver probe tools/power turbostat: Set per_cpu_msr_sum to NULL after free tools/power turbostat: Add LLC stats tools/power turbostat: Remove dead code tools/power turbostat: Refactor floating point printout code tools/power turbostat.8: Update example tools/power turbostat: Refactor added-counter value printing code tools/power turbostat: Refactor added column header printing tools/power turbostat: Add Wildcat Lake and Nova Lake support ...
2 parents 56a1a04 + 9c0bad7 commit 10003ff

3 files changed

Lines changed: 660 additions & 619 deletions

File tree

tools/power/x86/turbostat/turbostat.8

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The column name "all" can be used to enable all disabled-by-default built-in cou
101101
.PP
102102
\fB--show column\fP show only the specified built-in columns. May be invoked multiple times, or with a comma-separated list of column names.
103103
.PP
104-
\fB--show CATEGORY --hide CATEGORY\fP Show and hide also accept a single CATEGORY of columns: "all", "topology", "idle", "frequency", "power", "cpuidle", "hwidle", "swidle", "other". "idle" (enabled by default), includes "hwidle" and "pct_idle". "cpuidle" (default disabled) includes cpuidle software invocation counters. "swidle" includes "cpuidle" plus "pct_idle". "hwidle" includes only hardware based idle residency counters. Older versions of turbostat used the term "sysfs" for what is now "swidle".
104+
\fB--show CATEGORY --hide CATEGORY\fP Show and hide also accept a comma-separated-list of CATEGORIES of columns: "all", "topology", "idle", "frequency", "power", "cpuidle", "hwidle", "swidle", "cache", "llc", "other". "idle" (enabled by default), includes "hwidle" and "pct_idle". "cpuidle" (default disabled) includes cpuidle software invocation counters. "swidle" includes "cpuidle" plus "pct_idle". "hwidle" includes only hardware based idle residency counters. Older versions of turbostat used the term "sysfs" for what is now "swidle".
105105
.PP
106106
\fB--Dump\fP displays the raw counter values.
107107
.PP
@@ -159,6 +159,10 @@ The system configuration dump (if --quiet is not used) is followed by statistics
159159
.PP
160160
\fBSMI\fP The number of System Management Interrupts serviced CPU during the measurement interval. While this counter is actually per-CPU, SMI are triggered on all processors, so the number should be the same for all CPUs.
161161
.PP
162+
\fBLLCkRPS\fP Last Level Cache Thousands of References Per Second. For CPUs with an L3 LLC, this is the number of references that CPU made to the L3 (and the number of misses that CPU made to it's L2). For CPUs with an L2 LLC, this is the number of references to the L2 (and the number of misses to the CPU's L1). The system summary row shows the sum for all CPUs. In both cases, the value displayed is the actual value divided by 1000 in the interest of usually fitting into 8 columns.
163+
.PP
164+
\fBLLC%hit\fP Last Level Cache Hit Rate %. Hit Rate Percent = 100.0 * (References - Misses)/References. The system summary row shows the weighted average for all CPUs (100.0 * (Sum_References - Sum_Misses)/Sum_References).
165+
.PP
162166
\fBC1, C2, C3...\fP The number times Linux requested the C1, C2, C3 idle state during the measurement interval. The system summary line shows the sum for all CPUs. These are C-state names as exported in /sys/devices/system/cpu/cpu*/cpuidle/state*/name. While their names are generic, their attributes are processor specific. They the system description section of output shows what MWAIT sub-states they are mapped to on each system. These counters are in the "cpuidle" group, which is disabled, by default.
163167
.PP
164168
\fBC1+, C2+, C3+...\fP The idle governor idle state misprediction statistics. Inidcates the number times Linux requested the C1, C2, C3 idle state during the measurement interval, but should have requested a deeper idle state (if it exists and enabled). These statistics come from the /sys/devices/system/cpu/cpu*/cpuidle/state*/below file. These counters are in the "cpuidle" group, which is disabled, by default.
@@ -410,25 +414,24 @@ CPU pCPU%c1 CPU%c1
410414
.fi
411415

412416
.SH ADD PERF COUNTER EXAMPLE #2 (using virtual cpu device)
413-
Here we run on hybrid, Raptor Lake platform.
414-
We limit turbostat to show output for just cpu0 (pcore) and cpu12 (ecore).
417+
Here we run on hybrid, Meteor Lake platform.
418+
We limit turbostat to show output for just cpu0 (pcore) and cpu4 (ecore).
415419
We add a counter showing number of L3 cache misses, using virtual "cpu" device,
416420
labeling it with the column header, "VCMISS".
417421
We add a counter showing number of L3 cache misses, using virtual "cpu_core" device,
418-
labeling it with the column header, "PCMISS". This will fail on ecore cpu12.
422+
labeling it with the column header, "PCMISS". This will fail on ecore cpu4.
419423
We add a counter showing number of L3 cache misses, using virtual "cpu_atom" device,
420424
labeling it with the column header, "ECMISS". This will fail on pcore cpu0.
421425
We display it only once, after the conclusion of 0.1 second sleep.
422426
.nf
423-
sudo ./turbostat --quiet --cpu 0,12 --show CPU --add perf/cpu/cache-misses,cpu,delta,raw,VCMISS --add perf/cpu_core/cache-misses,cpu,delta,raw,PCMISS --add perf/cpu_atom/cache-misses,cpu,delta,raw,ECMISS sleep .1
427+
sudo ./turbostat --quiet --cpu 0,4 --show CPU --add perf/cpu/cache-misses,cpu,delta,VCMISS --add perf/cpu_core/cache-misses,cpu,delta,PCMISS --add perf/cpu_atom/cache-misses,cpu,delta,ECMISS sleep 5
424428
turbostat: added_perf_counters_init_: perf/cpu_atom/cache-misses: failed to open counter on cpu0
425-
turbostat: added_perf_counters_init_: perf/cpu_core/cache-misses: failed to open counter on cpu12
426-
0.104630 sec
427-
CPU ECMISS PCMISS VCMISS
428-
- 0x0000000000000000 0x0000000000000000 0x0000000000000000
429-
0 0x0000000000000000 0x0000000000007951 0x0000000000007796
430-
12 0x000000000001137a 0x0000000000000000 0x0000000000011392
431-
429+
turbostat: added_perf_counters_init_: perf/cpu_core/cache-misses: failed to open counter on cpu4
430+
5.001207 sec
431+
CPU ECMISS PCMISS VCMISS
432+
- 41586506 46291219 87877749
433+
4 83173012 0 83173040
434+
0 0 92582439 92582458
432435
.fi
433436

434437
.SH ADD PMT COUNTER EXAMPLE

0 commit comments

Comments
 (0)