linux-stable/tools/lib
Linus Torvalds 1bbeaf83dd perf tools changes for v6.9
perf stat
 ---------
 * Support new 'cluster' aggregation mode for shared resources depending on the
   hardware configuration.
 
     $ sudo perf stat -a --per-cluster -e cycles,instructions sleep 1
 
      Performance counter stats for 'system wide':
 
     S0-D0-CLS0    2         85,051,822      cycles
     S0-D0-CLS0    2         73,909,908      instructions      #    0.87  insn per cycle
     S0-D0-CLS2    2         93,365,918      cycles
     S0-D0-CLS2    2         83,006,158      instructions      #    0.89  insn per cycle
     S0-D0-CLS4    2        104,157,523      cycles
     S0-D0-CLS4    2         53,234,396      instructions      #    0.51  insn per cycle
     S0-D0-CLS6    2         65,891,079      cycles
     S0-D0-CLS6    2         41,478,273      instructions      #    0.63  insn per cycle
 
            1.002407989 seconds time elapsed
 
 * Various fixes and cleanups for event metrics including NaN handling.
 
 perf script
 -----------
 * Use libcapstone if available to disassemble the instructions.  This enables
   'perf script -F disasm' and 'perf script --insn-trace=disasm' (for Intel-PT).
 
     $ perf script -F event,ip,disasm
     cycles:P:  ffffffffa988d428             wrmsr
     cycles:P:  ffffffffa9839d25             movq %rax, %r14
     cycles:P:  ffffffffa9cdcaf0             endbr64
     cycles:P:  ffffffffa988d428             wrmsr
     cycles:P:  ffffffffa988d428             wrmsr
     cycles:P:  ffffffffaa401f86             iretq
     cycles:P:  ffffffffa99c4de5             movq 0x30(%rcx), %r8
     cycles:P:  ffffffffa988d428             wrmsr
     cycles:P:  ffffffffaa401f86             iretq
     cycles:P:  ffffffffa9907983             movl 0x68(%rbx), %eax
     cycles:P:  ffffffffa988d428             wrmsr
 
 * Expose sample ID / stream ID to python scripts
 
 perf test
 ---------
 * Add more perf test cases from Redhat internal test suites.  This time it adds
   the base infra and a few perf probe tests.  More to come. :)
 
 * Add 'perf test -p' for parallel execution and fix some issues found by the
   parallel test.
 
 * Support symbol test to print symbols in given (active) module:
 
     $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/fs/ext4/ext4.ko
     --- start ---
     Testing /lib/modules/6.5.13-1rodete2-amd64/kernel/fs/ext4/ext4.ko
     Overlapping symbols:
      7a990-7a9a0 l __pfx_ext4_exit_fs
      7a990-7a9a0 g __pfx_cleanup_module
     Overlapping symbols:
      7a9a0-7aa1c l ext4_exit_fs
      7a9a0-7aa1c g cleanup_module
     ...
 
 JSON metric updates
 -------------------
 * A new round of Intel metric updates.
 
 * Support Power11 PVR (compatible to Power10).
 
 * Fix cache latency events on Zen 4 to set SliceId properly.
 
 Internal
 --------
 * Fix reference counting for 'map' data structure, tireless work from Ian!
 
 * More memory optimization for struct thread and annotate histogram.  Now,
   'perf report' (TUI) and 'perf annotate' should be much lighter-weight in
   terms of memory footprint.
 
 * Support cross-arch perf register access.  Clean up the build configuration
   so that it can detect arch-register support at runtime.  This can allow to
   parse register data in sample which was recorded in a different arch.
 
 Others
 ------
 * Sync task state in 'perf sched' to kernel using trace event fields.  The
   task states have been changed so tools cannot assume a fixed encoding.
 
 * Clean up 'perf mem' to generalize the arch-specific events.
 
 * Add support for local and global variables to data type profiling.  This
   would increase the success rate of type resolution with DWARF.
 
 * Add short option -H for --hierarchy in 'perf report' and 'perf top'.
 
 Signed-off-by: Namhyung Kim <namhyung@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQSo2x5BnqMqsoHtzsmMstVUGiXMgwUCZfHmfhQcbmFtaHl1bmdA
 a2VybmVsLm9yZwAKCRCMstVUGiXMg5krAP9Es5KEhAHvTHo6y4OX9ktrNGB3j/FB
 YgakrWSuJxJ+UAD8D49wUloO3yVDVOe6MxJrZrHcEDGDV6qVSr0aPwDpyw4=
 =gPPl
 -----END PGP SIGNATURE-----

Merge tag 'perf-tools-for-v6.9-2024-03-13' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools updates from Namhyung Kim:
 "perf stat:

   - Support new 'cluster' aggregation mode for shared resources
     depending on the hardware configuration:

        $ sudo perf stat -a --per-cluster -e cycles,instructions sleep 1

         Performance counter stats for 'system wide':

        S0-D0-CLS0    2         85,051,822      cycles
        S0-D0-CLS0    2         73,909,908      instructions      #    0.87  insn per cycle
        S0-D0-CLS2    2         93,365,918      cycles
        S0-D0-CLS2    2         83,006,158      instructions      #    0.89  insn per cycle
        S0-D0-CLS4    2        104,157,523      cycles
        S0-D0-CLS4    2         53,234,396      instructions      #    0.51  insn per cycle
        S0-D0-CLS6    2         65,891,079      cycles
        S0-D0-CLS6    2         41,478,273      instructions      #    0.63  insn per cycle

               1.002407989 seconds time elapsed

   - Various fixes and cleanups for event metrics including NaN handling

  perf script:

   - Use libcapstone if available to disassemble the instructions. This
     enables 'perf script -F disasm' and 'perf script --insn-trace=disasm'
     (for Intel-PT):

        $ perf script -F event,ip,disasm
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffa9839d25             movq %rax, %r14
        cycles:P:  ffffffffa9cdcaf0             endbr64
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffaa401f86             iretq
        cycles:P:  ffffffffa99c4de5             movq 0x30(%rcx), %r8
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffaa401f86             iretq
        cycles:P:  ffffffffa9907983             movl 0x68(%rbx), %eax
        cycles:P:  ffffffffa988d428             wrmsr

   - Expose sample ID / stream ID to python scripts

  perf test:

   - Add more perf test cases from Redhat internal test suites. This
     time it adds the base infra and a few perf probe tests. More to
     come. :)

   - Add 'perf test -p' for parallel execution and fix some issues found
     by the parallel test

   - Support symbol test to print symbols in given (active) module:

        $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/fs/ext4/ext4.ko
        --- start ---
        Testing /lib/modules/6.5.13-1rodete2-amd64/kernel/fs/ext4/ext4.ko
        Overlapping symbols:
         7a990-7a9a0 l __pfx_ext4_exit_fs
         7a990-7a9a0 g __pfx_cleanup_module
        Overlapping symbols:
         7a9a0-7aa1c l ext4_exit_fs
         7a9a0-7aa1c g cleanup_module
        ...

  JSON metric updates:

   - A new round of Intel metric updates

   - Support Power11 PVR (compatible to Power10)

   - Fix cache latency events on Zen 4 to set SliceId properly

  Internal:

   - Fix reference counting for 'map' data structure, tireless work from
     Ian!

   - More memory optimization for struct thread and annotate histogram.
     Now, 'perf report' (TUI) and 'perf annotate' should be much
     lighter-weight in terms of memory footprint

   - Support cross-arch perf register access. Clean up the build
     configuration so that it can detect arch-register support at
     runtime. This can allow to parse register data in sample which was
     recorded in a different arch

  Others:

   - Sync task state in 'perf sched' to kernel using trace event fields.
     The task states have been changed so tools cannot assume a fixed
     encoding

   - Clean up 'perf mem' to generalize the arch-specific events

   - Add support for local and global variables to data type profiling.
     This would increase the success rate of type resolution with DWARF

   - Add short option -H for --hierarchy in 'perf report' and 'perf top'"

* tag 'perf-tools-for-v6.9-2024-03-13' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (154 commits)
  perf annotate: Add comments in the data structures
  perf annotate: Remove sym_hist.addr[] array
  perf annotate: Calculate instruction overhead using hashmap
  perf annotate: Add a hashmap for symbol histogram
  perf threads: Reduce table size from 256 to 8
  perf threads: Switch from rbtree to hashmap
  perf threads: Move threads to its own files
  perf machine: Move machine's threads into its own abstraction
  perf machine: Move fprintf to for_each loop and a callback
  perf trace: Ignore thread hashing in summary
  perf report: Sort child tasks by tid
  perf vendor events amd: Fix Zen 4 cache latency events
  perf version: Display availability of OpenCSD support
  perf vendor events intel: Add umasks/occ_sel to PCU events.
  perf map: Fix map reference count issues
  libperf evlist: Avoid out-of-bounds access
  perf lock contention: Account contending locks too
  perf metrics: Fix segv for metrics with no events
  perf metrics: Fix metric matching
  perf pmu: Fix a potential memory leak in perf_pmu__lookup()
  ...
2024-03-14 16:31:23 -07:00
..
api tools api fs: Avoid reading whole file for a 1 byte bool 2023-11-30 19:25:19 -03:00
bpf libbpf: Recognize __arena global variables. 2024-03-11 15:43:35 -07:00
perf libperf evlist: Avoid out-of-bounds access 2024-02-29 13:57:02 -08:00
subcmd tools subcmd: Add a no exec function call option 2024-02-22 09:12:25 -08:00
symbol tools lib symbol: Add dependency test to install_headers 2022-12-14 11:16:12 -03:00
thermal tools/lib/thermal: Fix include path for libnl3 in pkg-config file. 2023-02-15 17:29:40 +01:00
argv_split.c
bitmap.c Bitmap patches for v6.0-rc1 2022-08-07 17:52:35 -07:00
ctype.c
find_bit.c tools: sync find_bit() implementation 2022-09-21 12:21:44 -07:00
hweight.c
list_sort.c
rbtree.c
slab.c
str_error_r.c
string.c
vsprintf.c
zalloc.c