Commit a90f1cd1 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'turbostat-for-Linux-6.10-merge-window' of...

Merge tag 'turbostat-for-Linux-6.10-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux

Pull turbostat updates from Len Brown:

 - Survive sparse die id's seen in Linux-6.9

 - Handle clustered-uncore topology in new/upcoming hardware

 - For non-root use, add ability to see software C-state counters

 - Enable reading core and package hardware cstate via perf, and prefer
   perf over the MSR driver access for these counters

* tag 'turbostat-for-Linux-6.10-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power turbostat: version 2024.05.10
  tools/power turbostat: Ignore pkg_cstate_limit when it is not available
  tools/power turbostat: Fix order of strings in pkg_cstate_limit_strings
  tools/power turbostat: Read Package-cstates via perf
  tools/power turbostat: Read Core-cstates via perf
  tools/power turbostat: Avoid possible memory corruption due to sparse topology IDs
  tools/power turbostat: Add columns for clustered uncore frequency
  tools/power turbostat: Enable non-privileged users to read sysfs counters
  tools/power turbostat: Replace _Static_assert with BUILD_BUG_ON
  tools/power turbostat: Add ARL-H support
  tools/power turbostat: Enhance ARL/LNL support
  tools/power turbostat: Survive sparse die_id
  tools/power turbostat: Remember global max_die_id
  tools/power turbostat: Harden probe_intel_uncore_frequency()
  tools/power turbostat: Add "snapshot:" Makefile target
parents a7605628 256d218e
......@@ -3,6 +3,8 @@ CC = $(CROSS_COMPILE)gcc
BUILD_OUTPUT := $(CURDIR)
PREFIX ?= /usr
DESTDIR ?=
DAY := $(shell date +%Y.%m.%d)
SNAPSHOT = turbostat-$(DAY)
ifeq ("$(origin O)", "command line")
BUILD_OUTPUT := $(O)
......@@ -22,9 +24,30 @@ override CFLAGS += -D_FORTIFY_SOURCE=2
.PHONY : clean
clean :
@rm -f $(BUILD_OUTPUT)/turbostat
@rm -f $(SNAPSHOT).tar.gz
install : turbostat
install -d $(DESTDIR)$(PREFIX)/bin
install $(BUILD_OUTPUT)/turbostat $(DESTDIR)$(PREFIX)/bin/turbostat
install -d $(DESTDIR)$(PREFIX)/share/man/man8
install -m 644 turbostat.8 $(DESTDIR)$(PREFIX)/share/man/man8
snapshot: turbostat
@rm -rf $(SNAPSHOT)
@mkdir $(SNAPSHOT)
@cp turbostat Makefile turbostat.c turbostat.8 ../../../../arch/x86/include/asm/intel-family.h $(SNAPSHOT)
@sed -e 's/^#include <linux\/bits.h>/#include "bits.h"/' ../../../../arch/x86/include/asm/msr-index.h > $(SNAPSHOT)/msr-index.h
@echo '#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))' >> $(SNAPSHOT)/msr-index.h
@echo "#define BIT(x) (1 << (x))" > $(SNAPSHOT)/bits.h
@echo "#define BIT_ULL(nr) (1ULL << (nr))" >> $(SNAPSHOT)/bits.h
@echo "#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (sizeof(long) * 8 - 1 - (h))))" >> $(SNAPSHOT)/bits.h
@echo "#define GENMASK_ULL(h, l) (((~0ULL) << (l)) & (~0ULL >> (sizeof(long long) * 8 - 1 - (h))))" >> $(SNAPSHOT)/bits.h
@echo PWD=. > $(SNAPSHOT)/Makefile
@echo "CFLAGS += -DMSRHEADER='\"msr-index.h\"'" >> $(SNAPSHOT)/Makefile
@echo "CFLAGS += -DINTEL_FAMILY_HEADER='\"intel-family.h\"'" >> $(SNAPSHOT)/Makefile
@sed -e's/.*MSRHEADER.*//' -e's/.*INTEL_FAMILY_HEADER.*//' Makefile >> $(SNAPSHOT)/Makefile
@rm -f $(SNAPSHOT).tar.gz
tar cvzf $(SNAPSHOT).tar.gz $(SNAPSHOT)
......@@ -155,7 +155,9 @@ The system configuration dump (if --quiet is not used) is followed by statistics
.PP
\fBRAM_%\fP percent of the interval that RAPL throttling was active on DRAM.
.PP
\fBUncMHz\fP uncore MHz, instantaneous sample.
\fBUncMHz\fP per-package uncore MHz, instantaneous sample.
.PP
\fBUMHz1.0\fP per-package uncore MHz for domain=1 and fabric_cluster=0, instantaneous sample. System summary is the average of all packages.
.SH TOO MUCH INFORMATION EXAMPLE
By default, turbostat dumps all possible information -- a system configuration header, followed by columns for all counters.
This is ideal for remote debugging, use the "--out" option to save everything to a text file, and get that file to the expert helping you debug.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment