mirror-linux/tools/perf/tests
Linus Torvalds 9e906a9dea [GIT PULL] perf tools changes for v6.19
Perf event/metric description
 -----------------------------
 Unify all event and metric descriptions in JSON format.
 Now event parsing and handling is greatly simplified by that.
 
 From users point of view, perf list will provide richer
 information about hardware events like the following.
 
     $ perf list hw
 
     List of pre-defined events (to be used in -e or -M):
 
     legacy hardware:
       branch-instructions
            [Retired branch instructions [This event is an alias of branches]. Unit: cpu]
       branch-misses
            [Mispredicted branch instructions. Unit: cpu]
       branches
            [Retired branch instructions [This event is an alias of branch-instructions]. Unit: cpu]
       bus-cycles
            [Bus cycles,which can be different from total cycles. Unit: cpu]
       cache-misses
            [Cache misses. Usually this indicates Last Level Cache misses; this is intended to be used in conjunction with the
             PERF_COUNT_HW_CACHE_REFERENCES event to calculate cache miss rates. Unit: cpu]
       cache-references
            [Cache accesses. Usually this indicates Last Level Cache accesses but this may vary depending on your CPU. This may include
             prefetches and coherency messages; again this depends on the design of your CPU. Unit: cpu]
       cpu-cycles
            [Total cycles. Be wary of what happens during CPU frequency scaling [This event is an alias of cycles]. Unit: cpu]
       cycles
            [Total cycles. Be wary of what happens during CPU frequency scaling [This event is an alias of cpu-cycles]. Unit: cpu]
       instructions
            [Retired instructions. Be careful,these can be affected by various issues,most notably hardware interrupt counts. Unit: cpu]
       ref-cycles
            [Total cycles; not affected by CPU frequency scaling. Unit: cpu]
 
 But most notable changes would be in the perf stat.  On the right side,
 the default metrics are better named and aligned. :)
 
     $ perf stat -- perf test -w noploop
 
      Performance counter stats for 'perf test -w noploop':
 
                     11      context-switches                 #     10.8 cs/sec  cs_per_second
                      0      cpu-migrations                   #      0.0 migrations/sec  migrations_per_second
                  3,612      page-faults                      #   3532.5 faults/sec  page_faults_per_second
               1,022.51 msec task-clock                       #      1.0 CPUs  CPUs_utilized
                110,466      branch-misses                    #      0.0 %  branch_miss_rate         (88.66%)
          6,934,452,104      branches                         #   6781.8 M/sec  branch_frequency     (88.66%)
          4,657,032,590      cpu-cycles                       #      4.6 GHz  cycles_frequency       (88.65%)
         27,755,874,218      instructions                     #      6.0 instructions  insn_per_cycle  (89.03%)
                             TopdownL1                        #      0.3 %  tma_backend_bound
                                                              #      9.3 %  tma_bad_speculation      (89.05%)
                                                              #      9.7 %  tma_frontend_bound       (77.86%)
                                                              #     80.7 %  tma_retiring             (88.81%)
 
            1.025318171 seconds time elapsed
 
            1.013248000 seconds user
            0.012014000 seconds sys
 
 Deferred unwinding support
 --------------------------
 With the kernel support [1], perf can use deferred callchains for
 userspace stack trace with frame pointers like below:
 
     $ perf record --call-graph fp,defer ...
 
 This will be transparent to users when it comes to other commands like
 perf report and perf script.  They will merge the deferred callchains to
 the previous samples as if they were collected together.
 
 [1] https://git.kernel.org/torvalds/c/c69993ecdd4dfde2b7da08b022052a33b203da07
 
 ARM SPE updates
 ---------------
 * Extensive enhancements to support various kinds of memory operations
   including GCS, MTE allocation tags, memcpy/memset, register access,
   and SIMD operations.
 
 * Add inverted data source filter (inv_data_src_filter) support to
   exclude certain data sources.
 
 * Improve documentation.
 
 Vendor event updates
 --------------------
 * Intel: Updated event files for Sierra Forest, Panther Lake, Meteor Lake,
          Lunar Lake, Granite Rapids, and others.
 
 * Arm64: Added metrics for i.MX94 DDR PMU and Cortex-A720AE definitions.
 
 * RISC-V: Added JSON support for T-HEAD C920V2.
 
 Misc
 ----
 * Improve pointer tracking in data type profiling.  It'd give better
   output when the variable is using container_of() to convert type.
 
 * Annotation support for perf c2c report in TUI.  Press 'a' key to
   enter annotation view from cacheline browser window.  This will show
   which instruction is causing the cacheline contention.
 
 * Lots of fixes and test coverage improvements!
 
 Signed-off-by: Namhyung Kim <namhyung@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSo2x5BnqMqsoHtzsmMstVUGiXMgwUCaTUiWgAKCRCMstVUGiXM
 gzO3AQCaPM1/xAOtZ3Z21QEBrP+A0yFhmWMkI54IqZLsFl6qzQD/fvuorMblR+9W
 Nlr0Yyyo3zWnl2CD6s6AraIcLR5gVQs=
 =mjYC
 -----END PGP SIGNATURE-----

Merge tag 'perf-tools-for-v6.19-2025-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools updates from Namhyung Kim:
 "Perf event/metric description:

  Unify all event and metric descriptions in JSON format. Now event
  parsing and handling is greatly simplified by that.

  From users point of view, perf list will provide richer information
  about hardware events like the following.

    $ perf list hw

    List of pre-defined events (to be used in -e or -M):

    legacy hardware:
      branch-instructions
           [Retired branch instructions [This event is an alias of branches]. Unit: cpu]
      branch-misses
           [Mispredicted branch instructions. Unit: cpu]
      branches
           [Retired branch instructions [This event is an alias of branch-instructions]. Unit: cpu]
      bus-cycles
           [Bus cycles,which can be different from total cycles. Unit: cpu]
      cache-misses
           [Cache misses. Usually this indicates Last Level Cache misses; this is intended to be used in conjunction with the
            PERF_COUNT_HW_CACHE_REFERENCES event to calculate cache miss rates. Unit: cpu]
      cache-references
           [Cache accesses. Usually this indicates Last Level Cache accesses but this may vary depending on your CPU. This may include
            prefetches and coherency messages; again this depends on the design of your CPU. Unit: cpu]
      cpu-cycles
           [Total cycles. Be wary of what happens during CPU frequency scaling [This event is an alias of cycles]. Unit: cpu]
      cycles
           [Total cycles. Be wary of what happens during CPU frequency scaling [This event is an alias of cpu-cycles]. Unit: cpu]
      instructions
           [Retired instructions. Be careful,these can be affected by various issues,most notably hardware interrupt counts. Unit: cpu]
      ref-cycles
           [Total cycles; not affected by CPU frequency scaling. Unit: cpu]

  But most notable changes would be in the perf stat. On the right side,
  the default metrics are better named and aligned. :)

    $ perf stat -- perf test -w noploop

     Performance counter stats for 'perf test -w noploop':

                    11      context-switches                 #     10.8 cs/sec  cs_per_second
                     0      cpu-migrations                   #      0.0 migrations/sec  migrations_per_second
                 3,612      page-faults                      #   3532.5 faults/sec  page_faults_per_second
              1,022.51 msec task-clock                       #      1.0 CPUs  CPUs_utilized
               110,466      branch-misses                    #      0.0 %  branch_miss_rate         (88.66%)
         6,934,452,104      branches                         #   6781.8 M/sec  branch_frequency     (88.66%)
         4,657,032,590      cpu-cycles                       #      4.6 GHz  cycles_frequency       (88.65%)
        27,755,874,218      instructions                     #      6.0 instructions  insn_per_cycle  (89.03%)
                            TopdownL1                        #      0.3 %  tma_backend_bound
                                                             #      9.3 %  tma_bad_speculation      (89.05%)
                                                             #      9.7 %  tma_frontend_bound       (77.86%)
                                                             #     80.7 %  tma_retiring             (88.81%)

           1.025318171 seconds time elapsed

           1.013248000 seconds user
           0.012014000 seconds sys

  Deferred unwinding support:

  With the kernel support (commit c69993ecdd4d: "perf: Support deferred
  user unwind"), perf can use deferred callchains for userspace stack
  trace with frame pointers like below:

    $ perf record --call-graph fp,defer ...

  This will be transparent to users when it comes to other commands like
  perf report and perf script. They will merge the deferred callchains
  to the previous samples as if they were collected together.

  ARM SPE updates

   - Extensive enhancements to support various kinds of memory
     operations including GCS, MTE allocation tags, memcpy/memset,
     register access, and SIMD operations.

   - Add inverted data source filter (inv_data_src_filter) support to
     exclude certain data sources.

   - Improve documentation.

  Vendor event updates:

   - Intel: Updated event files for Sierra Forest, Panther Lake, Meteor
     Lake, Lunar Lake, Granite Rapids, and others.

   - Arm64: Added metrics for i.MX94 DDR PMU and Cortex-A720AE
     definitions.

   - RISC-V: Added JSON support for T-HEAD C920V2.

  Misc:

   - Improve pointer tracking in data type profiling. It'd give better
     output when the variable is using container_of() to convert type.

   - Annotation support for perf c2c report in TUI. Press 'a' key to
     enter annotation view from cacheline browser window. This will show
     which instruction is causing the cacheline contention.

   - Lots of fixes and test coverage improvements!"

* tag 'perf-tools-for-v6.19-2025-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (214 commits)
  libperf: Use 'extern' in LIBPERF_API visibility macro
  perf stat: Improve handling of termination by signal
  perf tests stat: Add test for error for an offline CPU
  perf stat: When no events, don't report an error if there is none
  perf tests stat: Add "--null" coverage
  perf cpumap: Add "any" CPU handling to cpu_map__snprint_mask
  libperf cpumap: Fix perf_cpu_map__max for an empty/NULL map
  perf stat: Allow no events to open if this is a "--null" run
  perf test kvm: Add some basic perf kvm test coverage
  perf tests evlist: Add basic evlist test
  perf tests script dlfilter: Add a dlfilter test
  perf tests kallsyms: Add basic kallsyms test
  perf tests timechart: Add a perf timechart test
  perf tests top: Add basic perf top coverage test
  perf tests buildid: Add purge and remove testing
  perf tests c2c: Add a basic c2c
  perf c2c: Clean up some defensive gets and make asan clean
  perf jitdump: Fix missed dso__put
  perf mem-events: Don't leak online CPU map
  perf hist: In init, ensure mem_info is put on error paths
  ...
2025-12-07 07:07:02 -08:00
..
config-fragments
shell [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
workloads perf test workload: Add thread count argument to thloop 2025-10-28 16:59:58 -07:00
Build perf test: Add kallsyms split test 2025-12-02 21:59:15 -08:00
api-io.c
backward-ring-buffer.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
bitmap.c
bp_account.c perf tests bp_account: Fix leaked file descriptor 2025-07-11 12:05:02 -07:00
bp_signal.c
bp_signal_overflow.c
builtin-test.c perf test: Add kallsyms split test 2025-12-02 21:59:15 -08:00
code-reading.c perf test: Switch cycles event to cpu-cycles 2025-10-15 23:59:12 +09:00
cpumap.c
demangle-java-test.c perf test demangle-java: Don't segv if demangling fails 2025-05-28 10:12:47 -03:00
demangle-ocaml-test.c perf test demangle-ocaml: Switch to using dso__demangle_sym() 2025-05-09 17:03:09 -03:00
demangle-rust-v0-test.c perf test demangle-rust: Add Rust demangling test 2025-05-09 17:01:57 -03:00
dlfilter-test.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
dso-data.c perf test dso-data: Correctly free test file in read test 2025-03-17 22:07:18 -07:00
dwarf-unwind.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
event-times.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
event_groups.c
event_update.c libperf evsel: Rename own_cpus to pmu_cpus 2025-07-24 13:41:35 -07:00
evsel-roundtrip-name.c
evsel-tp-sched.c
expand-cgroup.c perf stat: Move metric list from config to evlist 2025-07-11 12:36:40 -07:00
expr.c
fdarray.c
genelf.c
hists_common.c
hists_common.h
hists_cumulate.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_filter.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_link.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hists_output.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
hwmon_pmu.c perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies 2025-11-13 23:03:11 -08:00
is_printable_array.c
kallsyms-split.c perf test: Add kallsyms split test 2025-12-02 21:59:15 -08:00
keep-tracking.c perf test: Switch cycles event to cpu-cycles 2025-10-15 23:59:12 +09:00
kmod-path.c
make perf build: Remove NO_AUXTRACE build option 2025-11-13 23:03:11 -08:00
maps.c perf test maps: Additional maps__fixup_overlap_and_insert tests 2025-11-19 16:20:15 -08:00
mem.c
mem2node.c
mmap-basic.c perf test: Don't fail if user rdpmc returns 0 when disabled 2025-11-16 23:24:00 -08:00
mmap-thread-lookup.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
openat-syscall-all-cpus.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
openat-syscall-tp-fields.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
openat-syscall.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
parse-events.c perf tools: Add support for perf_event_attr::config4 2025-11-24 12:20:06 -08:00
parse-metric.c perf stat: Reduce scope of walltime_nsecs_stats 2025-11-17 18:43:09 -08:00
parse-no-sample-id-all.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
pe-file-parsing.c perf tools: Don't read build-ids from non-regular files 2025-11-26 10:13:38 -08:00
pe-file.c
pe-file.exe
pe-file.exe.debug
perf-hooks.c
perf-record.c perf test: Don't leak workload gopipe in PERF_RECORD_* 2025-09-19 16:39:20 -03:00
perf-targz-src-pkg perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
perf-time-to-tsc.c perf test: Switch cycles event to cpu-cycles 2025-10-15 23:59:12 +09:00
pfm.c perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies 2025-11-13 23:03:11 -08:00
pmu-events.c perf stat: Reduce scope of walltime_nsecs_stats 2025-11-17 18:43:09 -08:00
pmu.c perf parse-events: Remove unused FILE input argument to scanner 2025-10-15 23:59:10 +09:00
sample-parsing.c perf test: Move PERF_SAMPLE_WEIGHT_STRUCT parsing to common test 2025-07-25 10:37:58 -07:00
sdt.c perf tools: Don't read build-ids from non-regular files 2025-11-26 10:13:38 -08:00
sigtrap.c
stat.c
subcmd-help.c perf test: Add libsubcmd help tests 2025-07-01 15:51:55 -07:00
sw-clock.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
switch-tracking.c perf test: Switch cycles event to cpu-cycles 2025-10-15 23:59:12 +09:00
symbols.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
task-exit.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
tests-scripts.c perf test: Change all remaining #!/bin/sh to #!/bin/bash 2025-06-26 10:31:05 -07:00
tests-scripts.h
tests.h perf test: Add kallsyms split test 2025-12-02 21:59:15 -08:00
thread-map.c perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
thread-maps-share.c
time-utils-test.c
tool_pmu.c perf tests: Fix Tool PMU test segfault 2025-02-12 19:34:56 -08:00
topology.c perf evlist: Change env variable to session 2025-07-25 10:37:56 -07:00
unit_number__scnprintf.c
util.c perf util: add a basic SHA-1 implementation 2025-06-26 10:51:40 -07:00
vmlinux-kallsyms.c
wp.c