linux/tools/perf
Linus Torvalds dd384658c7 perf tools changes for v7.4
- Support instruction tracking on arm64 for data type profiling, resolving
   stack, global, per-CPU and 'current' variable accesses, so that 'perf
   annotate --data-type' resolves types on arm64 the way it does on x86.
 
 - Port the Python scripts to the perf module and standalone execution, and
   improve the module: lazy sample callchains and event copies, GIL
   handling, better session/thread lookup, new treport, flamegraph and
   sqlite/postgres exporters.
 
 - Reenable and fix the attribute expectation test suite: per-PMU bit
   masks, other core PMUs' events, dummy tracking events, group checks
   and spelled out skip reasons.
 
 - perf trace: filter the target's tasks in BPF, open the BPF output event
   on every CPU, add an option to disable syscall augmentation and raise
   TRACE_AUG_MAX_BUF.
 
 - perf jitdump: harden record parsing, validating unwinding sizes and
   symbol names, byte-swapping debug entries via safe accessors and fixing
   frees on error paths.
 
 - perf annotate-data fixes: bound the member nesting recursion, resolve
   type DIEs in the debug file they came from, adjust the offset for
   flex-arrays and show the sample count in the data-type browser.
 
 - perf symbol and debug info: try linked debug files for DSOs, avoid
   repeated failing searches, set binary/symtab types for split kallsyms,
   JIT maps and the build-id cache, fix libbfd symbol loading.
 
 - perf config: serialize config file access with a mutex, add the
   DEFINE_MUTEX() and DO_ONCE() primitives and a robust process shared
   mutex, add the core.hybrid-merge option.
 
 - perf report: add --progress and --no-progress options.
 
 - perf mem: add a false sharing workload to 'perf test', request
   PERF_SAMPLE_CPU by default, use the IBS swfilt filter when available
   and decode L0 in the memory level.
 
 - perf test: take turns using the perf mlock budget in the mmaping tests,
   add the 'needs_mlock' suite flag, scope the probe based tests to their
   PID and make more tests non-exclusive.
 
 - perf vendor events intel: update events and metrics to TMA 5.2, refresh
   the event tables and fix umask encodings.
 
 - perf build: run shellcheck, mypy and pylint in parallel, make pylint
   opt-out with NO_PYLINT=1, fix clean and install dependencies.
 
 - Add a script and a 'make sync-headers' target to sync the tools/ copies
   of kernel headers with the kernel sources, plus the resulting syncs of
   the cpufeatures, KVM, fs, mount, fcntl, socket, rtnetlink, if_addr and
   sound headers.
 
 - Fix cs-etm HW_ID mapping synthesis for raw trace, queue teardown leaks
   and duplicate v0 global mappings.
 
 - Add a 'perf bench atomic' benchmark for atomic operations.
 
 - Filter events before creating lock_stat in 'perf lock contention'.
 
 - Add a 'perf test' case for events re-armed with PERF_EVENT_IOC_REFRESH.
 
 - Fix memory leaks on 'perf c2c' output fields and add function view
   stdio coverage to its test.
 
 - Fix a NULL dereference resolving callchains in 'perf machine'.
 
 - Optimize the libdw fallback when DWARF is missing and try the symbol
   file first when checking for debuginfo.
 
 - Don't call eprintf() in pr_debugN() when not verbose.
 
 - Don't delete cumulative caller entries before the stat_acc decays in
   'perf report'.
 
 - Fix ring buffer cursor handling: keep the consumed cursor in forward
   mode and use the head selected by read_init.
 
 - Fix 'perf test mmap-basic' user rdpmc detection and only test userspace
   reading on supported platforms.
 
 - Build fixes: include sys/types.h for ssize_t, errno.h before kernel
   headers and fix jevents.py type annotations for mypy 2.x.
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCauUL4QAKCRCyPKLppCJ+
 JzsyAQCNjqGOBYEUaDbQAbK1/1h9D9QER9s+4aU3Np2zT9XSPAD/RkY12uxT3YAO
 NcQlaj0On+I46SkgyGzGrV9mOvDZJwo=
 =b9um
 -----END PGP SIGNATURE-----

Merge tag 'perf-tools-for-v7.4-1-2026-10-30' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next

Pull perf tool updates from Arnaldo Carvalho de Melo:

 - Support instruction tracking on arm64 for data type profiling,
   resolving stack, global, per-CPU and 'current' variable accesses, so
   that 'perf annotate --data-type' resolves types on arm64 the way it
   does on x86.

 - Port the Python scripts to the perf module and standalone execution,
   and improve the module: lazy sample callchains and event copies, GIL
   handling, better session/thread lookup, new treport, flamegraph and
   sqlite/postgres exporters.

 - Reenable and fix the attribute expectation test suite: per-PMU bit
   masks, other core PMUs' events, dummy tracking events, group checks
   and spelled out skip reasons.

 - perf trace: filter the target's tasks in BPF, open the BPF output
   event on every CPU, add an option to disable syscall augmentation and
   raise TRACE_AUG_MAX_BUF.

 - perf jitdump: harden record parsing, validating unwinding sizes and
   symbol names, byte-swapping debug entries via safe accessors and
   fixing frees on error paths.

 - perf annotate-data fixes: bound the member nesting recursion, resolve
   type DIEs in the debug file they came from, adjust the offset for
   flex-arrays and show the sample count in the data-type browser.

 - perf symbol and debug info: try linked debug files for DSOs, avoid
   repeated failing searches, set binary/symtab types for split
   kallsyms, JIT maps and the build-id cache, fix libbfd symbol loading.

 - perf config: serialize config file access with a mutex, add the
   DEFINE_MUTEX() and DO_ONCE() primitives and a robust process shared
   mutex, add the core.hybrid-merge option.

 - perf report: add --progress and --no-progress options.

 - perf mem: add a false sharing workload to 'perf test', request
   PERF_SAMPLE_CPU by default, use the IBS swfilt filter when available
   and decode L0 in the memory level.

 - perf test: take turns using the perf mlock budget in the mmaping
   tests, add the 'needs_mlock' suite flag, scope the probe based tests
   to their PID and make more tests non-exclusive.

 - perf vendor events intel: update events and metrics to TMA 5.2,
   refresh the event tables and fix umask encodings.

 - perf build: run shellcheck, mypy and pylint in parallel, make pylint
   opt-out with NO_PYLINT=1, fix clean and install dependencies.

 - Add a script and a 'make sync-headers' target to sync the tools/
   copies of kernel headers with the kernel sources, plus the resulting
   syncs of the cpufeatures, KVM, fs, mount, fcntl, socket, rtnetlink,
   if_addr and sound headers.

 - Fix cs-etm HW_ID mapping synthesis for raw trace, queue teardown
   leaks and duplicate v0 global mappings.

 - Add a 'perf bench atomic' benchmark for atomic operations.

 - Filter events before creating lock_stat in 'perf lock contention'.

 - Add a 'perf test' case for events re-armed with
   PERF_EVENT_IOC_REFRESH.

 - Fix memory leaks on 'perf c2c' output fields and add function view
   stdio coverage to its test.

 - Fix a NULL dereference resolving callchains in 'perf machine'.

 - Optimize the libdw fallback when DWARF is missing and try the symbol
   file first when checking for debuginfo.

 - Don't call eprintf() in pr_debugN() when not verbose.

 - Don't delete cumulative caller entries before the stat_acc decays in
   'perf report'.

 - Fix ring buffer cursor handling: keep the consumed cursor in forward
   mode and use the head selected by read_init.

 - Fix 'perf test mmap-basic' user rdpmc detection and only test
   userspace reading on supported platforms.

 - Build fixes: include sys/types.h for ssize_t, errno.h before kernel
   headers and fix jevents.py type annotations for mypy 2.x.

* tag 'perf-tools-for-v7.4-1-2026-10-30' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next: (425 commits)
  perf machine: Fix NULL deref in thread__resolve_callchain_sample()
  perf pmu-events: Fix jevents.py type annotations for mypy 2.x
  perf parse-events: Include errno.h before kernel headers
  perf print_insn: Include sys/types.h for ssize_t
  perf tests mmap-basic: Fix user rdpmc detection logic
  perf tests mmap-basic: Only test userspace reading on supported platforms
  perf mmap: Preserve the consumed cursor in forward mode
  perf mmap: Use the head selected by read_init
  perf hist: Do not delete cumulative caller entries before stat_acc decays
  perf debug: Avoid calling eprintf() in pr_debugN() when verbose < n
  perf libdw: Optimize fallback logic for missing DWARF
  tools headers: Sync KVM headers with the kernel sources
  tools headers: Sync UAPI sound/asound.h with the kernel sources
  tools headers: Sync UAPI linux/mount.h with the kernel sources
  tools headers: Sync UAPI linux/fs.h with the kernel sources
  tools headers: Sync UAPI linux/fcntl.h with the kernel sources
  tools headers: Sync linux/socket.h with the kernel sources
  tools arch x86: Sync the cpufeatures.h copy with the kernel sources
  tools headers UAPI: Sync linux/rtnetlink.h with the kernel sources
  tools headers UAPI: Sync linux/if_addr.h with the kernel sources
  ...
2026-10-30 21:54:38 -07:00
..
arch perf mem record: Use the IBS swfilt filter when available 2026-09-25 18:14:26 +02:00
bench perf bench: Add atomic operations benchmark 2026-10-21 19:25:29 -03:00
check-header_ignore_hunks/lib
dlfilters
Documentation perf bench: Add atomic operations benchmark 2026-10-21 19:25:29 -03:00
include/perf
jvmti
pmu-events perf pmu-events: Fix jevents.py type annotations for mypy 2.x 2026-10-27 17:40:37 -03:00
python perf treport: Fix profile builder type narrowing in progress callback 2026-10-19 09:25:01 -03:00
scripts perf tools: Add script and make target to sync the header copies with the kernel 2026-10-22 17:17:20 -03:00
tests perf tests mmap-basic: Fix user rdpmc detection logic 2026-10-27 17:40:24 -03:00
trace perf tools changes for v7.4 2026-10-30 21:54:38 -07:00
ui perf report: Add --no-progress option 2026-10-07 11:40:29 +02:00
util perf tools changes for v7.4 2026-10-30 21:54:38 -07:00
.clang-format perf tool: Align structs in arrays in .clang-format 2026-09-09 17:03:35 -03:00
.gitignore
bpf_skel.mak
Build perf build: Run shellcheck, mypy, and remaining pylint checks in parallel 2026-10-01 17:53:34 +02:00
builtin-annotate.c perf annotate: Default to --itrace=i1i for data type profiling 2026-09-21 08:41:55 +02:00
builtin-bench.c perf bench: Add atomic operations benchmark 2026-10-21 19:25:29 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Fix empty output for AUX data 2026-09-25 00:55:44 +02:00
builtin-c2c.c perf c2c: Fix memory leaks on output fields 2026-10-21 16:14:59 -03:00
builtin-check.c perf script: Support standalone scripts and remove embedded scripting 2026-09-26 21:16:03 +02:00
builtin-config.c perf config: Move perf_config__set_variable() to util/config.c 2026-10-07 11:40:28 +02:00
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c perf ftrace latency: Do not read trace files when BPF is used 2026-09-08 18:04:33 -03:00
builtin-help.c perf tool: Tidy up util/cache.h header file users 2026-09-08 17:50:28 -03:00
builtin-inject.c perf machine: Add session back pointer to fix out of bounds read 2026-09-25 14:08:40 +02:00
builtin-kallsyms.c
builtin-kmem.c perf trace-event: Report tracepoint format errors with NULL and errno 2026-09-25 14:57:39 +02:00
builtin-kvm.c perf kvm: Cast tv_usec to long to fix build on MIPS 32-bits 2026-10-17 16:39:29 -03:00
builtin-kwork.c
builtin-list.c perf list: Add a --tui option to launch ilist 2026-10-03 11:22:44 +02:00
builtin-lock.c perf lock contention: Filter events before creating lock_stat 2026-10-21 19:25:29 -03:00
builtin-mem.c perf mem record: Request PERF_SAMPLE_CPU by default 2026-09-25 18:14:22 +02:00
builtin-probe.c
builtin-record.c perf record: Fix unhandled POLLHUP on non_perf_event descriptors 2026-09-17 12:27:34 -03:00
builtin-report.c perf report: Add --no-progress option 2026-10-07 11:40:29 +02:00
builtin-sched.c perf sched stats: Reject mismatched or incomplete snapshots 2026-09-30 15:34:17 -03:00
builtin-script.c perf script: Support standalone scripts and remove embedded scripting 2026-09-26 21:16:03 +02:00
builtin-stat.c perf stat: Avoid uninitialized memory read on error 2026-09-09 08:10:17 -03:00
builtin-timechart.c perf timechart: Add an interactive --tui mode 2026-10-03 11:41:36 +02:00
builtin-top.c perf config: Add core.hybrid-merge to configure event merging 2026-09-18 17:37:45 -03:00
builtin-trace.c perf trace: Increase TRACE_AUG_MAX_BUF to 128 and document beauty_map encoding 2026-10-02 18:05:04 +02:00
builtin-version.c
builtin.h perf tool: Move usage strings and functions to perf.c 2026-09-08 17:50:32 -03:00
check-headers.sh
CREDITS
design.txt
Makefile perf tools: Add script and make target to sync the header copies with the kernel 2026-10-22 17:17:20 -03:00
Makefile.config perf mutex: Add a robust, process-shared mutex initializer 2026-10-17 10:30:20 -03:00
Makefile.perf perf tools: Add script and make target to sync the header copies with the kernel 2026-10-22 17:17:20 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf trace-event: Free the global trace_event when a command ends 2026-09-25 14:58:03 +02:00
perf.h