linux/tools/perf/util
Linus Torvalds c7decec2f2 perf tools changes for v7.0:
- Introduce 'perf sched stats' tool with record/report/diff workflows
   using schedstat counters.
 
 - Add a faster libdw based addr2line implementation and allow selecting
   it or its alternatives via 'perf config addr2line.style='.
 
 - Data-type profiling fixes and improvements including the ability
   to select fields using 'perf report''s -F/-fields, e.g.:
 
     'perf report --fields overhead,type'
 
 - Add 'perf test' regression tests for Data-type profiling with
   C and Rust workloads.
 
 - Fix srcline printing with inlines in callchains, make sure this has
   coverage in 'perf test'.
 
 - Fix printing of leaf IP in LBR callchains.
 
 - Fix display of metrics without sufficient permission in 'perf stat'.
 
 - Print all machines in 'perf kvm report -vvv', not just the host.
 
 - Switch from SHA-1 to BLAKE2s for build ID generation, remove SHA-1
   code.
 
 - Fix 'perf report's histogram entry collapsing with '-F' option.
 
 - Use system's cacheline size instead of a hardcoded value in 'perf
   report'.
 
 - Allow filtering conversion by time range in 'perf data'.
 
 - Cover conversion to CTF using 'perf data' in 'perf test'.
 
 - Address newer glibc const-correctness (-Werror=discarded-qualifiers)
   issues.
 
 - Fixes and improvements for ARM's CoreSight support, simplify ARM SPE
   event config in 'perf mem', update docs for 'perf c2c' including the
   ARM events it can be used with.
 
 - Build support for generating metrics from arch specific python script,
   add extra AMD, Intel, ARM64 metrics using it.
 
 - Add AMD Zen 6 events and metrics.
 
 - Add JSON file with OpenHW Risc-V CVA6 hardware counters.
 
 - Add 'perf kvm' stats live testing.
 
 - Add more 'perf stat' tests to 'perf test'.
 
 - Fix segfault in `perf lock contention -b/--use-bpf`
 
 - Fix various 'perf test' cases for s390.
 
 - Build system cleanups, bump minimum shellcheck version to 0.7.2
 
 - Support building the capstone based annotation routines as a plugin.
 
 - Allow passing extra Clang flags via EXTRA_BPF_FLAGS.
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCaZn25QAKCRCyPKLppCJ+
 J9MbAQCTKChBwDsqVh5iPr0UAc+mez9LOPJFa580SYH9nmd1jgD+Oqip7xCf514G
 ZtYPNh+Mz0se0Mcb++syLUEjxvbrQQY=
 =y2VY
 -----END PGP SIGNATURE-----

Merge tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools updates from Arnaldo Carvalho de Melo:

 - Introduce 'perf sched stats' tool with record/report/diff workflows
   using schedstat counters

 - Add a faster libdw based addr2line implementation and allow selecting
   it or its alternatives via 'perf config addr2line.style='

 - Data-type profiling fixes and improvements including the ability to
   select fields using 'perf report''s -F/-fields, e.g.:

     'perf report --fields overhead,type'

 - Add 'perf test' regression tests for Data-type profiling with C and
   Rust workloads

 - Fix srcline printing with inlines in callchains, make sure this has
   coverage in 'perf test'

 - Fix printing of leaf IP in LBR callchains

 - Fix display of metrics without sufficient permission in 'perf stat'

 - Print all machines in 'perf kvm report -vvv', not just the host

 - Switch from SHA-1 to BLAKE2s for build ID generation, remove SHA-1
   code

 - Fix 'perf report's histogram entry collapsing with '-F' option

 - Use system's cacheline size instead of a hardcoded value in 'perf
   report'

 - Allow filtering conversion by time range in 'perf data'

 - Cover conversion to CTF using 'perf data' in 'perf test'

 - Address newer glibc const-correctness (-Werror=discarded-qualifiers)
   issues

 - Fixes and improvements for ARM's CoreSight support, simplify ARM SPE
   event config in 'perf mem', update docs for 'perf c2c' including the
   ARM events it can be used with

 - Build support for generating metrics from arch specific python
   script, add extra AMD, Intel, ARM64 metrics using it

 - Add AMD Zen 6 events and metrics

 - Add JSON file with OpenHW Risc-V CVA6 hardware counters

 - Add 'perf kvm' stats live testing

 - Add more 'perf stat' tests to 'perf test'

 - Fix segfault in `perf lock contention -b/--use-bpf`

 - Fix various 'perf test' cases for s390

 - Build system cleanups, bump minimum shellcheck version to 0.7.2

 - Support building the capstone based annotation routines as a plugin

 - Allow passing extra Clang flags via EXTRA_BPF_FLAGS

* tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (255 commits)
  perf test script: Add python script testing support
  perf test script: Add perl script testing support
  perf script: Allow the generated script to be a path
  perf test: perf data --to-ctf testing
  perf test: Test pipe mode with data conversion --to-json
  perf json: Pipe mode --to-ctf support
  perf json: Pipe mode --to-json support
  perf check: Add libbabeltrace to the listed features
  perf build: Allow passing extra Clang flags via EXTRA_BPF_FLAGS
  perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing
  tools build: Fix feature test for rust compiler
  perf libunwind: Fix calls to thread__e_machine()
  perf stat: Add no-affinity flag
  perf evlist: Reduce affinity use and move into iterator, fix no affinity
  perf evlist: Missing TPEBS close in evlist__close()
  perf evlist: Special map propagation for tool events that read on 1 CPU
  perf stat-shadow: In prepare_metric fix guard on reading NULL perf_stat_evsel
  Revert "perf tool_pmu: More accurately set the cpus for tool events"
  tools build: Emit dependencies file for test-rust.bin
  tools build: Make test-rust.bin be removed by the 'clean' target
  ...
2026-02-21 10:51:08 -08:00
..
annotate-arch perf disasm: Refactor arch__find and initialization of arch structs 2026-01-23 16:58:39 -03:00
arm-spe-decoder
bpf_skel
cs-etm-decoder
dwarf-regs-arch perf dwarf-regs: Add MIPS perf to DWARF register number mapping functions 2026-01-20 15:43:56 -03:00
hisi-ptt-decoder
include perf dwarf-regs: Add MIPS perf to DWARF register number mapping functions 2026-01-20 15:43:56 -03:00
intel-pt-decoder
kvm-stat-arch perf kvm stat: Fix build error 2026-02-06 18:07:05 -03:00
libunwind
perf-regs-arch perf regs: Remove __weak attributive arch_sdt_arg_parse_op() function 2026-02-06 12:16:12 -03:00
scripting-engines perf thread: Don't require machine to compute the e_machine 2026-02-03 18:01:27 -03:00
Build perf kvm stat: Remove use of the arch directory 2026-02-03 18:01:27 -03:00
PERF-VERSION-GEN
addr2line.c perf test: Fix test case perftool-testsuite_report for s390 2026-02-09 15:51:35 -03:00
addr2line.h
addr_location.c perf map_symbol: Switch from holding maps to holding thread 2026-01-23 16:58:39 -03:00
addr_location.h perf map_symbol: Switch from holding maps to holding thread 2026-01-23 16:58:39 -03:00
affinity.c
affinity.h
amd-sample-raw.c
annotate-data.c perf disasm: Rework the string arch__is to use the ELF machine 2026-01-23 16:58:38 -03:00
annotate-data.h perf disasm: Constify use of 'struct arch' 2026-01-23 16:58:38 -03:00
annotate.c perf annotate: Fix register usage in data type profiling 2026-02-06 18:18:52 -03:00
annotate.h perf disasm: Refactor arch__find and initialization of arch structs 2026-01-23 16:58:39 -03:00
arm-spe.c
arm-spe.h
arm64-frame-pointer-unwind-support.c perf regs: Refactor use of arch__sample_reg_masks() to perf_reg_name() 2026-01-23 16:58:39 -03:00
arm64-frame-pointer-unwind-support.h
auxtrace.c
auxtrace.h
blake2s.c perf util: Add BLAKE2s support 2026-01-13 17:03:25 -03:00
blake2s.h perf util: Add BLAKE2s support 2026-01-13 17:03:25 -03:00
block-info.c
block-info.h
block-range.c
block-range.h
bpf-event.c perf bpf-event: Constify variables storing the result of strchr() on const tables 2026-01-27 02:35:29 -03:00
bpf-event.h
bpf-filter.c
bpf-filter.h
bpf-filter.l
bpf-filter.y
bpf-trace-summary.c
bpf-utils.c perf tools: Switch printf("...%s", strerror(errno)) to printf("...%m") 2026-01-14 17:22:50 -03:00
bpf-utils.h
bpf_counter.c
bpf_counter.h
bpf_counter_cgroup.c
bpf_ftrace.c
bpf_kwork.c
bpf_kwork_top.c
bpf_lock_contention.c perf lock contention: fix segfault in `lock contention -b/--use-bpf` 2026-02-06 18:57:26 -03:00
bpf_map.c
bpf_map.h
bpf_off_cpu.c
bpf_trace_augment.c
branch.c
branch.h
btf.c
btf.h
build-id.c
build-id.h
cache.h
cacheline.c
cacheline.h
call-path.c
call-path.h
callchain.c perf callchain: Switch callchain_param_setup from an arch to an e_machine 2026-01-27 01:35:47 -03:00
callchain.h perf callchain: Switch callchain_param_setup from an arch to an e_machine 2026-01-27 01:35:47 -03:00
cap.c perf tools: Switch printf("...%s", strerror(errno)) to printf("...%m") 2026-01-14 17:22:50 -03:00
cap.h
capstone.c perf capstone: Support for dlopen-ing libcapstone.so 2026-02-03 11:34:02 -03:00
capstone.h perf capstone: Support for dlopen-ing libcapstone.so 2026-02-03 11:34:02 -03:00
cgroup.c
cgroup.h
clockid.c
clockid.h
cloexec.c
cloexec.h
color.c
color.h
color_config.c
comm.c
comm.h
compress.h
config.c perf srcline: Add configuration support for the addr2line style 2026-01-13 16:09:14 -03:00
config.h
copyfile.c
copyfile.h
counts.c
counts.h
cpu-set-sched.h
cpumap.c
cpumap.h
cputopo.c
cputopo.h
cs-etm-base.c
cs-etm.c perf: Remove redundant kernel.h include 2026-01-28 15:18:44 -03:00
cs-etm.h
data-convert-bt.c perf json: Pipe mode --to-ctf support 2026-02-12 17:45:22 -03:00
data-convert-json.c perf json: Pipe mode --to-json support 2026-02-12 17:45:22 -03:00
data-convert.h
data.c perf tools: Switch printf("...%s", strerror(errno)) to printf("...%m") 2026-01-14 17:22:50 -03:00
data.h
db-export.c perf map_symbol: Switch from holding maps to holding thread 2026-01-23 16:58:39 -03:00
db-export.h
debug.c
debug.h
debuginfo.c
debuginfo.h
demangle-cxx.cpp
demangle-cxx.h
demangle-java.c perf demangle-java: Constify variables storing the result of strchr() on const tables 2026-01-27 02:33:29 -03:00
demangle-java.h
demangle-ocaml.c
demangle-ocaml.h
demangle-rust-v0.c
demangle-rust-v0.h
disasm.c perf disasm: Constify variables storing the result of bsearch() on const tables 2026-01-27 01:44:21 -03:00
disasm.h perf thread: Add optional e_flags output argument to thread__e_machine 2026-01-26 18:21:20 -03:00
dlfilter.c perf script: Fix script_fetch_insn for more than just x86 2026-01-27 01:35:22 -03:00
dlfilter.h
drm_pmu.c
drm_pmu.h
dso.c perf thread: Add optional e_flags output argument to thread__e_machine 2026-01-26 18:21:20 -03:00
dso.h perf thread: Add optional e_flags output argument to thread__e_machine 2026-01-26 18:21:20 -03:00
dsos.c
dsos.h
dump-insn.c
dump-insn.h
dwarf-aux.c
dwarf-aux.h
dwarf-regs.c perf dwarf-regs: Add MIPS perf to DWARF register number mapping functions 2026-01-20 15:43:56 -03:00
env.c perf header: Support CPU DOMAIN relation info 2026-01-21 21:55:09 -03:00
env.h perf header: Add e_machine/e_flags to the header 2026-02-03 18:01:27 -03:00
event.c perf map_symbol: Switch from holding maps to holding thread 2026-01-23 16:58:39 -03:00
event.h perf sched stats: Add record and rawdump support 2026-01-22 12:29:28 -03:00
events_stats.h
evlist.c perf stat: Add no-affinity flag 2026-02-10 09:35:28 -03:00
evlist.h perf stat: Add no-affinity flag 2026-02-10 09:35:28 -03:00
evsel.c perf regs: Remove __weak attributive arch__xxx_reg_mask() functions 2026-02-06 12:16:09 -03:00
evsel.h perf session: Add e_flags to the e_machine helper 2026-02-03 18:01:27 -03:00
evsel_config.h perf parse-events: Track all user changed config bits 2026-01-14 23:14:54 -03:00
evsel_fprintf.c perf callchain: Fix srcline printing with inlines 2026-01-13 16:21:33 -03:00
evsel_fprintf.h
evswitch.c
evswitch.h
expr.c
expr.h
expr.l
expr.y
find-map.c
fncache.c
fncache.h
ftrace.h
genelf.c perf genelf: Switch from SHA-1 to BLAKE2s for build ID generation 2026-01-13 17:03:28 -03:00
genelf.h
genelf_debug.c
hashmap.c
hashmap.h
header.c perf header: Add e_machine/e_flags to the header 2026-02-03 18:01:27 -03:00
header.h perf header: Add e_machine/e_flags to the header 2026-02-03 18:01:27 -03:00
help-unknown-cmd.c
help-unknown-cmd.h
hisi-ptt.c
hisi-ptt.h
hist.c perf map_symbol: Switch from holding maps to holding thread 2026-01-23 16:58:39 -03:00
hist.h
hwmon_pmu.c perf hwmon_pmu: Constify the variables returning bsearch() on const tables 2026-01-27 02:15:30 -03:00
hwmon_pmu.h
intel-bts.c
intel-bts.h
intel-pt.c
intel-pt.h
intel-tpebs.c
intel-tpebs.h
intlist.c
intlist.h
iostat.c
iostat.h
jit.h
jitdump.c perf jitdump: Constify variables storing the result of strchr() on const tables 2026-01-27 02:36:24 -03:00
jitdump.h
kvm-stat.c perf session: Add e_flags to the e_machine helper 2026-02-03 18:01:27 -03:00
kvm-stat.h perf kvm: Wire up e_machine 2026-02-03 18:01:27 -03:00
kwork.h
levenshtein.c
levenshtein.h
libbfd.c perf annotate: Fix BUILD_NONDISTRO=1 missing args->ms conversions to pointer 2026-01-26 18:21:15 -03:00
libbfd.h
libdw.c perf powerpc: Unify the skip-callchain-idx libdw with that for addr2line 2026-01-20 13:04:38 -03:00
libdw.h perf powerpc: Unify the skip-callchain-idx libdw with that for addr2line 2026-01-20 13:04:38 -03:00
llvm-c-helpers.cpp
llvm-c-helpers.h
llvm.c perf disasm: Rework the string arch__is to use the ELF machine 2026-01-23 16:58:38 -03:00
llvm.h
lock-contention.c
lock-contention.h
lzma.c perf tools: Switch printf("...%s", strerror(errno)) to printf("...%m") 2026-01-14 17:22:50 -03:00
machine.c perf callchain lbr: Make the leaf IP that of the sample 2026-02-06 18:10:44 -03:00
machine.h
map.c
map.h
map_symbol.c perf map_symbol: Switch from holding maps to holding thread 2026-01-23 16:58:39 -03:00
map_symbol.h perf map_symbol: Switch from holding maps to holding thread 2026-01-23 16:58:39 -03:00
maps.c perf maps: Fix reference count leak in maps__find_ams() 2026-01-23 16:58:38 -03:00
maps.h perf unwind-libdw: Don't discard loaded ELF/DWARF after every unwind 2026-01-20 15:43:56 -03:00
mem-events.c
mem-events.h
mem-info.c
mem-info.h
mem2node.c
mem2node.h
memswap.c
memswap.h
metricgroup.c perf metricgroup: Don't early exit if no CPUID table exists 2026-02-06 11:58:51 -03:00
metricgroup.h
mmap.c
mmap.h
mutex.c
mutex.h
namespaces.c
namespaces.h
off_cpu.h
ordered-events.c
ordered-events.h
parse-branch-options.c
parse-branch-options.h
parse-events.c perf evlist: Special map propagation for tool events that read on 1 CPU 2026-02-10 09:33:28 -03:00
parse-events.h
parse-events.l
parse-events.y
parse-regs-options.c perf regs: Remove __weak attributive arch__xxx_reg_mask() functions 2026-02-06 12:16:09 -03:00
parse-regs-options.h
parse-sublevel-options.c
parse-sublevel-options.h
path.c
path.h
perf-hooks-list.h
perf-hooks.c
perf-hooks.h
perf_api_probe.c
perf_api_probe.h
perf_event_attr_fprintf.c
perf_regs.c perf regs: Remove __weak attributive arch_sdt_arg_parse_op() function 2026-02-06 12:16:12 -03:00
perf_regs.h perf regs: Remove __weak attributive arch_sdt_arg_parse_op() function 2026-02-06 12:16:12 -03:00
pfm.c
pfm.h
pmu.c perf tools changes for v7.0: 2026-02-21 10:51:08 -08:00
pmu.h perf evlist: Reduce affinity use and move into iterator, fix no affinity 2026-02-10 09:34:44 -03:00
pmu.l
pmu.y
pmus.c
pmus.h
powerpc-vpadtl.c
powerpc-vpadtl.h
print-events.c perf list: Don't write to const memory 2026-01-21 11:01:22 -03:00
print-events.h
print_binary.c
print_binary.h
print_insn.c
print_insn.h
probe-event.c
probe-event.h
probe-file.c perf regs: Remove __weak attributive arch_sdt_arg_parse_op() function 2026-02-06 12:16:12 -03:00
probe-file.h
probe-finder.c
probe-finder.h
pstack.c
pstack.h
python.c
rblist.c
rblist.h
record.c
record.h
rlimit.c
rlimit.h
rwsem.c
rwsem.h
s390-cpumcf-kernel.h
s390-cpumsf-kernel.h
s390-cpumsf.c
s390-cpumsf.h
s390-sample-raw.c
sample-raw.c
sample-raw.h
sample.c perf callchain: Switch callchain_param_setup from an arch to an e_machine 2026-01-27 01:35:47 -03:00
sample.h perf script: Fix script_fetch_insn for more than just x86 2026-01-27 01:35:22 -03:00
session.c perf thread: Don't require machine to compute the e_machine 2026-02-03 18:01:27 -03:00
session.h perf session: Add e_flags to the e_machine helper 2026-02-03 18:01:27 -03:00
setns.c
setup.py
sharded_mutex.c
sharded_mutex.h
sideband_evlist.c
smt.c
smt.h
sort.c perf sort: Replace static cacheline size with sysconf cacheline size 2026-02-06 18:51:15 -03:00
sort.h
spark.c
spark.h
srccode.c
srccode.h
srcline.c perf powerpc: Unify the skip-callchain-idx libdw with that for addr2line 2026-01-20 13:04:38 -03:00
srcline.h perf srcline: Add configuration support for the addr2line style 2026-01-13 16:09:14 -03:00
stat-display.c perf stat: Ensure metrics are displayed even with failed events 2026-02-06 18:18:32 -03:00
stat-shadow.c perf stat-shadow: In prepare_metric fix guard on reading NULL perf_stat_evsel 2026-02-10 09:33:13 -03:00
stat.c
stat.h perf stat: Ensure metrics are displayed even with failed events 2026-02-06 18:18:32 -03:00
strbuf.c
strbuf.h
stream.c
stream.h
strfilter.c
strfilter.h
string.c
string2.h
strlist.c perf strlist: Remove dont_dupstr logic, used only once 2026-01-27 21:19:24 -03:00
strlist.h perf strlist: Remove dont_dupstr logic, used only once 2026-01-27 21:19:24 -03:00
svghelper.c
svghelper.h
symbol-elf.c perf symbol-elf: Fix leak of ELF files with GNU debugdata 2026-01-20 12:52:08 -03:00
symbol-minimal.c
symbol.c
symbol.h
symbol_conf.h perf srcline: Add configuration support for the addr2line style 2026-01-13 16:09:14 -03:00
symbol_fprintf.c
symsrc.h
synthetic-events.c perf sched stats: Add schedstat v17 support 2026-01-22 12:31:51 -03:00
synthetic-events.h perf sched stats: Add record and rawdump support 2026-01-22 12:29:28 -03:00
syscalltbl.c
syscalltbl.h
target.c
target.h
term.c
term.h
thread-stack.c perf thread-stack: Switch thread_stack__init() to use e_machine 2026-01-27 01:35:47 -03:00
thread-stack.h
thread.c perf thread: Don't require machine to compute the e_machine 2026-02-03 18:01:27 -03:00
thread.h perf thread: Add optional e_flags output argument to thread__e_machine 2026-01-26 18:21:20 -03:00
thread_map.c perf strlist: Remove dont_dupstr logic, used only once 2026-01-27 21:19:24 -03:00
thread_map.h
threads.c
threads.h
time-utils.c perf time-utils: Constify variables storing the result of strchr() on const tables 2026-01-27 02:31:29 -03:00
time-utils.h
tool.c perf sched stats: Add record and rawdump support 2026-01-22 12:29:28 -03:00
tool.h perf sched stats: Add record and rawdump support 2026-01-22 12:29:28 -03:00
tool_pmu.c Revert "perf tool_pmu: More accurately set the cpus for tool events" 2026-02-10 09:32:34 -03:00
tool_pmu.h Revert "perf tool_pmu: More accurately set the cpus for tool events" 2026-02-10 09:32:34 -03:00
top.c
top.h
topdown.c
topdown.h
tp_pmu.c perf tp_pmu: Address const-correctness errors in recent glibcs 2026-01-27 02:22:00 -03:00
tp_pmu.h
trace-event-info.c perf trace-event: Constify variables storing the result of strchr() on const tables 2026-01-27 02:26:48 -03:00
trace-event-parse.c
trace-event-read.c
trace-event-scripting.c perf script: Fix script_fetch_insn for more than just x86 2026-01-27 01:35:22 -03:00
trace-event.c
trace-event.h perf script: Fix script_fetch_insn for more than just x86 2026-01-27 01:35:22 -03:00
trace.h
trace_augment.h
tracepoint.c
tracepoint.h
trigger.h
tsc.c
tsc.h
units.c perf units: Constify variables storing the result of strchr() on const tables 2026-01-27 02:28:33 -03:00
units.h
unwind-libdw.c perf unwind-libdw: Wire up e_flags for CSKY 2026-01-26 18:31:27 -03:00
unwind-libdw.h perf unwind-libdw: Wire up e_flags for CSKY 2026-01-26 18:31:27 -03:00
unwind-libunwind-local.c perf libunwind: Fix calls to thread__e_machine() 2026-02-12 17:45:22 -03:00
unwind-libunwind.c
unwind.h
usage.c
util.c perf util: Fix NULL check in cpumask_to_cpulist() 2026-01-28 15:18:24 -03:00
util.h perf sched stats: Add support for report subcommand 2026-01-22 12:31:52 -03:00
values.c
values.h
vdso.c
vdso.h
zlib.c
zstd.c