projects/linux·commit f4f346c3

Merge tag 'perf-tools-for-v6.17-2025-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

f4f346c3 · Linus Torvalds <[email protected]> · 2025-08-01 16:55:47 -07:00

Pull perf tools updates from Namhyung Kim:
 "Build-ID processing goodies:

     Build-IDs are content based hashes to link regions of memory to ELF
     files in post processing. They have been available in distros for
     quite a while:

       $ file /bin/bash
       /bin/bash: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV),
       dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
       BuildID[sha1]=707a1c670cd72f8e55ffedfbe94ea98901b7ce3a,
       for GNU/Linux 3.2.0, stripped

     It is possible to ask the kernel to get it from mmap executable
     backing storage at time they are being put in place and send it as
     metadata at that moment to have in perf.data.

     Prefer that across the board to speed up 'record' time - it post
     processes the samples to find binaries touched by any samples and
     to save them with build-ID. It can skip reading build-ID in
     userspace if it comes from the kernel.

  perf record:

   * Make --buildid-mmap default.  The kernel can generate MMAP2 events
     with a build-ID from ELF header.  Use that by default instead of using
     inode and device ID to identify binaries.  It also can be disabled
     with --no-buildid-mmap.

   * Use BPF for -u/--uid option to sample processes belong to a user.
     BPF can track user processes more accurately and the existing logic
     often fails to get the list of processes due to race with reading the
     /proc filesystem.

   * Generate PERF_RECORD_BPF_METADATA when it profiles BPF programs and
     they have variables starting with "bpf_metadata_".  This will help to
     identify BPF objects used in the profile.  This has been supported in
     bpftool for some time and allows the recording of metadata such as
     commit hashes, versions, etc, that now gets recorded in perf.data as
     well.

   * Collect list of DSOs touched in the sample callchains as well as in
     the sample itself.  This would increase the processing time at the end
     of record, but can improve the data quality.

  perf stat:

   * Add a new 'drm' pseudo-PMU support like in 'hwmon'.  It can collect
     DRM usage stats using fdinfo in /proc.

     On my Intel laptop, it shows like below:

       $ perf list drm
       ...

       drm:
         drm-active-stolen-system0
              [Total memory active in one or more engines. Unit: drm_i915]
         drm-active-system0
              [Total memory active in one or more engines. Unit: drm_i915]
         drm-engine-capacity-video
              [Engine capacity. Unit: drm_i915]
         drm-engine-copy
              [Utilization in ns. Unit: drm_i915]
         drm-engine-render
              [Utilization in ns. Unit: drm_i915]
         drm-engine-video
              [Utilization in ns. Unit: drm_i915]
         ...

       $ sudo perf stat -a -e drm-engine-render,drm-engine-video,drm-engine-capacity-video sleep 1

        Performance counter stats for 'system wide':

       48,137,316,988,873 ns       drm-engine-render
           34,452,696,746 ns       drm-engine-video
                       20 capacity drm-engine-capacity-video

              1.002086194 seconds time elapsed

  perf list

   * Add description for software events.  The description is in JSON format
     and the event parser now can handle the software events like others
     (for example, it's case-insensitive and subject to wildcard matching).

       $ perf list software

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

       software:
         alignment-faults
              [Number of kernel handled memory alignment faults. Unit: software]
         bpf-output
              [An event used by BPF programs to write to the perf ring buffer. Unit: software]
         cgroup-switches
              [Number of context switches to a task in a different cgroup. Unit: software]
         context-switches
              [Number of context switches [This event is an alias of cs]. Unit: software]
         cpu-clock
              [Per-CPU high-resolution timer based event. Unit: software]
         cpu-migrations
              [Number of times a process has migrated to a new CPU [This event is an alias of migrations]. Unit: software]
         cs
              [Number of context switches [This event is an alias of context-switches]. Unit: software]
         dummy
              [A placeholder event that doesn't count anything. Unit: software]
         emulation-faults
              [Number of kernel handled unimplemented instruction faults handled through emulation. Unit: software]
         faults
              [Number of page faults [This event is an alias of page-faults]. Unit: software]
         major-faults
              [Number of major page faults. Major faults require I/O to handle. Unit: software]
         migrations
              [Number of times a process has migrated to a new CPU [This event is an alias of cpu-migrations]. Unit: software]
         minor-faults
              [Number of minor page faults. Minor faults don't require I/O to handle. Unit: software]
         page-faults
              [Number of page faults [This event is an alias of faults]. Unit: software]
         task-clock
              [Per-task high-resolution timer based event. Unit: software]

  perf ftrace:

   * Add -e/--events option to perf ftrace latency to measure latency
     between the two events instead of a function.

       $ sudo perf ftrace latency -ab -e i915_request_wait_begin,i915_request_wait_end --hide-empty -- sleep 1
       #   DURATION     |      COUNT | GRAPH                                |
          256 -  512 us |          4 | ######                               |
            2 -    4 ms |          2 | ###                                  |
            4 -    8 ms |         12 | ###################                  |
            8 -   16 ms |         10 | ################                     |

       # statistics  (in usec)
         total time:               194915
           avg time:                 6961
           max time:                12855
           min time:                  373
              count:                   28

   * Add new function graph tracer options (--graph-opts) to display more
     info like arguments and return value.  They will be passed to the
     kernel ftrace directly.

       $ sudo perf ftrace -G vfs_write --graph-opts retval,retaddr
       # tracer: function_graph
       #
       # CPU  DURATION                  FUNCTION CALLS
       # |     |   |                     |   |   |   |
       ...
       5)               |  mutex_unlock() { /* <-rb_simple_write+0xda/0x150 */
       5)   0.188 us    |    local_clock(); /* <-lock_release+0x2ad/0x440 ret=0x3bf2a3cf90e */
       5)               |    rt_mutex_slowunlock() { /* <-rb_simple_write+0xda/0x150 */
       5)               |      _raw_spin_lock_irqsave() { /* <-rt_mutex_slowunlock+0x4f/0x200 */
       5)   0.123 us    |        preempt_count_add(); /* <-_raw_spin_lock_irqsave+0x23/0x90 ret=0x0 */
       5)   0.128 us    |        local_clock(); /* <-__lock_acquire.isra.0+0x17a/0x740 ret=0x3bf2a3cfc8b */
       5)   0.086 us    |        do_raw_spin_trylock(); /* <-_raw_spin_lock_irqsave+0x4a/0x90 ret=0x1 */
       5)   0.845 us    |      } /* _raw_spin_lock_irqsave ret=0x292 */
       ...

  Misc:

   * Add perf archive --exclude-buildids <FILE> option to skip some binaries.
     The format of the FILE should be same as an output of perf buildid-list.

   * Get rid of dependency of libcrypto.  It was just to get SHA-1 hash so
     implement it directly like in the kernel.  A side effect is that it
     needs -fno-strict-aliasing compiler option (again, like in the kernel).

   * Convert all shell script tests to use bash"

* tag 'perf-tools-for-v6.17-2025-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (179 commits)
  perf record: Cache build-ID of hit DSOs only
  perf test: Ensure lock contention using pipe mode
  perf python: Stop using deprecated PyUnicode_AsString()
  perf list: Skip ABI PMUs when printing pmu values
  perf list: Remove tracepoint printing code
  perf tp_pmu: Add event APIs
  perf tp_pmu: Factor existing tracepoint logic to new file
  perf parse-events: Remove non-json software events
  perf jevents: Add common software event json
  perf tools: Remove libtraceevent in .gitignore
  perf test: Fix comment ordering
  perf sort: Use perf_env to set arch sort keys and header
  perf test: Move PERF_SAMPLE_WEIGHT_STRUCT parsing to common test
  perf sample: Remove arch notion of sample parsing
  perf env: Remove global perf_env
  perf trace: Avoid global perf_env with evsel__env
  perf auxtrace: Pass perf_env from session through to mmap read
  perf machine: Explicitly pass in host perf_env
  perf bench synthesize: Avoid use of global perf_env
  perf top: Make perf_env locally scoped
  ...
Commit
f4f346c3465949ebba80c6cc52cd8d2eeaa545fd
Parents
0905809b · 6235ce77

Merge commit. Changes below are compared with the first parent: 0905809b.

Changes

359 files changed · +10612 −3324

FileStatusAddDelContent
tools/build/Makefile.featuremodified+1−8View file
tools/build/feature/Makefilemodified+3−24View file
tools/build/feature/test-all.cmodified+0−24View file
tools/build/feature/test-libbpf-strings.cadded+10−0View file
tools/build/feature/test-libcrypto.cdeleted+0−25View before deletion
tools/lib/perf/evlist.cmodified+81−38View file
tools/lib/perf/evsel.cmodified+11−0View file
tools/lib/perf/include/internal/evsel.hmodified+2−1View file
tools/lib/perf/include/perf/event.hmodified+18−0View file
tools/lib/subcmd/help.cmodified+7−5View file
tools/lib/subcmd/run-command.cmodified+13−2View file
tools/perf/.gitignoremodified+0−2View file
tools/perf/Buildmodified+1−1View file
tools/perf/Documentation/perf-check.txtmodified+1−1View file
tools/perf/Documentation/perf-ftrace.txtmodified+10−0View file
tools/perf/Documentation/perf-list.txtmodified+16−9View file
tools/perf/Documentation/perf-record.txtmodified+3−1View file
tools/perf/Documentation/perf-stat.txtmodified+4−2View file
tools/perf/Documentation/perf-trace.txtmodified+0−8View file
tools/perf/Makefile.configmodified+19−15View file
tools/perf/Makefile.perfmodified+7−5View file
tools/perf/arch/powerpc/util/Buildmodified+0−1View file
tools/perf/arch/powerpc/util/event.cdeleted+0−60View before deletion
tools/perf/arch/x86/Buildmodified+1−1View file
tools/perf/arch/x86/include/arch-tests.hmodified+4−1View file
tools/perf/arch/x86/tests/Buildmodified+2−2View file
tools/perf/arch/x86/tests/arch-tests.cmodified+1−2View file
tools/perf/arch/x86/tests/sample-parsing.cdeleted+0−125View before deletion
tools/perf/arch/x86/tests/topdown.cadded+76−0View file
tools/perf/arch/x86/util/event.cmodified+0−46View file
tools/perf/arch/x86/util/evlist.cmodified+24−0View file
tools/perf/arch/x86/util/evsel.cmodified+12−34View file
tools/perf/arch/x86/util/topdown.cmodified+38−21View file
tools/perf/arch/x86/util/topdown.hmodified+6−0View file
tools/perf/bench/evlist-open-close.cmodified+21−15View file
tools/perf/bench/inject-buildid.cmodified+1−1View file
tools/perf/bench/synthesize.cmodified+19−8View file
tools/perf/builtin-annotate.cmodified+3−3View file
tools/perf/builtin-buildid-cache.cmodified+11−11View file
tools/perf/builtin-buildid-list.cmodified+7−4View file
tools/perf/builtin-c2c.cmodified+39−30View file
tools/perf/builtin-check.cmodified+1−1View file
tools/perf/builtin-diff.cmodified+1−1View file
tools/perf/builtin-ftrace.cmodified+107−4View file
tools/perf/builtin-inject.cmodified+25−17View file
tools/perf/builtin-kallsyms.cmodified+16−5View file
tools/perf/builtin-kmem.cmodified+1−1View file
tools/perf/builtin-kvm.cmodified+2−4View file
tools/perf/builtin-kwork.cmodified+1−1View file
tools/perf/builtin-list.cmodified+45−20View file
tools/perf/builtin-lock.cmodified+2−2View file
tools/perf/builtin-mem.cmodified+1−1View file
tools/perf/builtin-record.cmodified+66−35View file
tools/perf/builtin-report.cmodified+19−8View file
tools/perf/builtin-sched.cmodified+119−41View file
tools/perf/builtin-script.cmodified+24−12View file
tools/perf/builtin-stat.cmodified+28−33View file
tools/perf/builtin-timechart.cmodified+1−1View file
tools/perf/builtin-top.cmodified+57−31View file
tools/perf/builtin-trace.cmodified+95−173View file
tools/perf/check-headers.shmodified+3−6View file
tools/perf/include/perf/perf_dlfilter.hmodified+1−1View file
tools/perf/jvmti/libjvmti.cmodified+2−2View file
tools/perf/perf-archive.shmodified+30−5View file
tools/perf/perf.cmodified+0−3View file
tools/perf/pmu-events/arch/arm64/common-and-microarch.jsonmodified+70−0View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/core-imp-def.jsonmodified+1−1View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/cycle_accounting.jsonmodified+2−2View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/exception.jsonmodified+1−1View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/fp_operation.jsonmodified+77−21View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l1d_cache.jsonmodified+5−5View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l1i_cache.jsonmodified+4−4View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l2_cache.jsonmodified+14−14View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l3_cache.jsonmodified+29−34View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/ll_cache.jsonmodified+1−1View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/pipeline.jsonmodified+3−3View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/spec_operation.jsonmodified+6−6View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/stall.jsonmodified+2−2View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/sve.jsonmodified+22−22View file
tools/perf/pmu-events/arch/arm64/fujitsu/monaka/tlb.jsonmodified+28−28View file
tools/perf/pmu-events/arch/common/common/software.jsonadded+92−0View file
tools/perf/pmu-events/arch/s390/cf_z16/pai_crypto.jsonmodified+7−7View file
tools/perf/pmu-events/arch/s390/cf_z17/basic.jsonadded+58−0View file
tools/perf/pmu-events/arch/s390/cf_z17/crypto6.jsonadded+142−0View file
tools/perf/pmu-events/arch/s390/cf_z17/extended.jsonadded+541−0View file
tools/perf/pmu-events/arch/s390/cf_z17/pai_crypto.jsonadded+1213−0View file
tools/perf/pmu-events/arch/s390/cf_z17/pai_ext.jsonadded+261−0View file
tools/perf/pmu-events/arch/s390/cf_z17/transaction.jsonadded+72−0View file
tools/perf/pmu-events/arch/s390/mapfile.csvmodified+1−0View file
tools/perf/pmu-events/arch/x86/alderlake/cache.jsonmodified+21−35View file
tools/perf/pmu-events/arch/x86/alderlake/floating-point.jsonmodified+0−1View file
tools/perf/pmu-events/arch/x86/alderlake/other.jsonmodified+0−1View file
tools/perf/pmu-events/arch/x86/alderlake/pipeline.jsonmodified+6−38View file
tools/perf/pmu-events/arch/x86/alderlake/virtual-memory.jsonmodified+0−3View file
tools/perf/pmu-events/arch/x86/alderlaken/cache.jsonmodified+19−33View file
tools/perf/pmu-events/arch/x86/alderlaken/floating-point.jsonmodified+0−1View file
tools/perf/pmu-events/arch/x86/alderlaken/other.jsonmodified+0−1View file
tools/perf/pmu-events/arch/x86/alderlaken/pipeline.jsonmodified+5−37View file
tools/perf/pmu-events/arch/x86/alderlaken/virtual-memory.jsonmodified+0−3View file
tools/perf/pmu-events/arch/x86/arrowlake/cache.jsonmodified+12−1View file
tools/perf/pmu-events/arch/x86/arrowlake/frontend.jsonmodified+135−0View file
tools/perf/pmu-events/arch/x86/cascadelakex/floating-point.jsonmodified+3−3View file
tools/perf/pmu-events/arch/x86/cascadelakex/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/emeraldrapids/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/emeraldrapids/uncore-io.jsonmodified+12−0View file
tools/perf/pmu-events/arch/x86/emeraldrapids/uncore-memory.jsonmodified+20−0View file
tools/perf/pmu-events/arch/x86/grandridge/grr-metrics.jsonmodified+24−6View file
tools/perf/pmu-events/arch/x86/grandridge/uncore-interconnect.jsonmodified+10−0View file
tools/perf/pmu-events/arch/x86/grandridge/uncore-io.jsonmodified+12−0View file
tools/perf/pmu-events/arch/x86/graniterapids/cache.jsonmodified+9−0View file
tools/perf/pmu-events/arch/x86/graniterapids/counter.jsonmodified+5−5View file
tools/perf/pmu-events/arch/x86/graniterapids/gnr-metrics.jsonmodified+36−0View file
tools/perf/pmu-events/arch/x86/graniterapids/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/graniterapids/uncore-interconnect.jsonmodified+0−19View file
tools/perf/pmu-events/arch/x86/graniterapids/uncore-io.jsonmodified+26−1View file
tools/perf/pmu-events/arch/x86/icelakex/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/icelakex/uncore-cache.jsonmodified+0−2View file
tools/perf/pmu-events/arch/x86/lunarlake/cache.jsonmodified+11−0View file
tools/perf/pmu-events/arch/x86/lunarlake/pipeline.jsonmodified+14−4View file
tools/perf/pmu-events/arch/x86/lunarlake/virtual-memory.jsonmodified+0−18View file
tools/perf/pmu-events/arch/x86/mapfile.csvmodified+15−14View file
tools/perf/pmu-events/arch/x86/meteorlake/cache.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/meteorlake/frontend.jsonmodified+72−0View file
tools/perf/pmu-events/arch/x86/meteorlake/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/pantherlake/cache.jsonadded+278−0View file
tools/perf/pmu-events/arch/x86/pantherlake/counter.jsonadded+12−0View file
tools/perf/pmu-events/arch/x86/pantherlake/frontend.jsonadded+30−0View file
tools/perf/pmu-events/arch/x86/pantherlake/memory.jsonadded+215−0View file
tools/perf/pmu-events/arch/x86/pantherlake/pipeline.jsonadded+325−0View file
tools/perf/pmu-events/arch/x86/pantherlake/virtual-memory.jsonadded+62−0View file
tools/perf/pmu-events/arch/x86/sapphirerapids/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/sapphirerapids/uncore-io.jsonmodified+12−0View file
tools/perf/pmu-events/arch/x86/sapphirerapids/uncore-memory.jsonmodified+20−0View file
tools/perf/pmu-events/arch/x86/sierraforest/frontend.jsonmodified+64−0View file
tools/perf/pmu-events/arch/x86/sierraforest/pipeline.jsonmodified+8−0View file
tools/perf/pmu-events/arch/x86/sierraforest/srf-metrics.jsonmodified+48−0View file
tools/perf/pmu-events/arch/x86/sierraforest/uncore-cache.jsonmodified+3−3View file
tools/perf/pmu-events/arch/x86/sierraforest/uncore-interconnect.jsonmodified+44−9View file
tools/perf/pmu-events/arch/x86/sierraforest/uncore-io.jsonmodified+26−1View file
tools/perf/pmu-events/arch/x86/skylakex/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/arch/x86/tigerlake/pipeline.jsonmodified+1−1View file
tools/perf/pmu-events/empty-pmu-events.cmodified+158−108View file
tools/perf/pmu-events/jevents.pymodified+18−1View file
tools/perf/pmu-events/pmu-events.hmodified+10−4View file
tools/perf/scripts/python/flamegraph.pymodified+53−29View file
tools/perf/tests/Buildmodified+2−1View file
tools/perf/tests/backward-ring-buffer.cmodified+0−1View file
tools/perf/tests/bp_account.cmodified+1−0View file
tools/perf/tests/builtin-test.cmodified+89−3View file
tools/perf/tests/code-reading.cmodified+4−9View file
tools/perf/tests/dlfilter-test.cmodified+28−23View file
tools/perf/tests/dwarf-unwind.cmodified+7−3View file
tools/perf/tests/event-times.cmodified+3−5View file
tools/perf/tests/event_update.cmodified+2−2View file
tools/perf/tests/expand-cgroup.cmodified+7−17View file
tools/perf/tests/hists_cumulate.cmodified+4−4View file
tools/perf/tests/hists_filter.cmodified+4−4View file
tools/perf/tests/hists_link.cmodified+4−4View file
tools/perf/tests/hists_output.cmodified+5−5View file
tools/perf/tests/hwmon_pmu.cmodified+6−5View file
tools/perf/tests/keep-tracking.cmodified+1−1View file
tools/perf/tests/makemodified+4−4View file
tools/perf/tests/mmap-basic.cmodified+212−79View file
tools/perf/tests/mmap-thread-lookup.cmodified+5−1View file
tools/perf/tests/openat-syscall-all-cpus.cmodified+1−1View file
tools/perf/tests/openat-syscall-tp-fields.cmodified+0−1View file
tools/perf/tests/openat-syscall.cmodified+1−1View file
tools/perf/tests/parse-events.cmodified+12−12View file
tools/perf/tests/parse-metric.cmodified+5−11View file
tools/perf/tests/pe-file-parsing.cmodified+1−1View file
tools/perf/tests/perf-record.cmodified+0−1View file
tools/perf/tests/perf-targz-src-pkgmodified+1−1View file
tools/perf/tests/perf-time-to-tsc.cmodified+1−1View file
tools/perf/tests/pmu-events.cmodified+2−28View file
tools/perf/tests/sample-parsing.cmodified+14−0View file
tools/perf/tests/sdt.cmodified+2−2View file
tools/perf/tests/shell/amd-ibs-swfilt.shmodified+1−1View file
tools/perf/tests/shell/annotate.shmodified+8−7View file
tools/perf/tests/shell/buildid.shmodified+1−1View file
tools/perf/tests/shell/coresight/asm_pure_loop.shmodified+1−1View file
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.shmodified+1−1View file
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.shmodified+1−1View file
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.shmodified+1−1View file
tools/perf/tests/shell/coresight/unroll_loop_thread_10.shmodified+1−1View file
tools/perf/tests/shell/diff.shmodified+1−1View file
tools/perf/tests/shell/drm_pmu.shadded+78−0View file
tools/perf/tests/shell/ftrace.shmodified+1−1View file
tools/perf/tests/shell/header.shadded+74−0View file
tools/perf/tests/shell/lib/perf_has_symbol.shmodified+1−1View file
tools/perf/tests/shell/lib/perf_json_output_lint.pymodified+2−2View file
tools/perf/tests/shell/lib/probe_vfs_getname.shmodified+1−1View file
tools/perf/tests/shell/lib/setup_python.shmodified+1−1View file
tools/perf/tests/shell/lib/waiting.shmodified+1−1View file
tools/perf/tests/shell/list.shmodified+1−1View file
tools/perf/tests/shell/lock_contention.shmodified+14−14View file
tools/perf/tests/shell/perf-report-hierarchy.shmodified+1−1View file
tools/perf/tests/shell/probe_vfs_getname.shmodified+1−1View file
tools/perf/tests/shell/record+probe_libc_inet_pton.shmodified+4−3View file
tools/perf/tests/shell/record+script_probe_vfs_getname.shmodified+1−1View file
tools/perf/tests/shell/record+zstd_comp_decomp.shmodified+1−1View file
tools/perf/tests/shell/record.shmodified+56−0View file
tools/perf/tests/shell/record_bpf_filter.shmodified+1−1View file
tools/perf/tests/shell/record_offcpu.shmodified+1−1View file
tools/perf/tests/shell/record_sideband.shmodified+1−1View file
tools/perf/tests/shell/sched.shadded+116−0View file
tools/perf/tests/shell/script.shmodified+1−1View file
tools/perf/tests/shell/stat+csv_summary.shmodified+1−1View file
tools/perf/tests/shell/stat+shadow_stat.shmodified+1−1View file
tools/perf/tests/shell/stat_all_pfm.shmodified+1−1View file
tools/perf/tests/shell/stat_bpf_counters.shmodified+1−1View file
tools/perf/tests/shell/stat_bpf_counters_cgrp.shmodified+1−1View file
tools/perf/tests/shell/test_arm_callgraph_fp.shmodified+1−1View file
tools/perf/tests/shell/test_arm_coresight.shmodified+1−1View file
tools/perf/tests/shell/test_arm_coresight_disasm.shmodified+1−1View file
tools/perf/tests/shell/test_arm_spe.shmodified+1−1View file
tools/perf/tests/shell/test_arm_spe_fork.shmodified+1−1View file
tools/perf/tests/shell/test_bpf_metadata.shadded+76−0View file
tools/perf/tests/shell/test_intel_pt.shmodified+1−1View file
tools/perf/tests/shell/trace+probe_vfs_getname.shmodified+1−1View file
tools/perf/tests/shell/trace_btf_enum.shmodified+10−9View file
tools/perf/tests/shell/trace_btf_general.shmodified+9−10View file
tools/perf/tests/shell/trace_exit_race.shmodified+1−1View file
tools/perf/tests/shell/trace_record_replay.shmodified+1−1View file
tools/perf/tests/shell/trace_summary.shmodified+1−1View file
tools/perf/tests/subcmd-help.cadded+108−0View file
tools/perf/tests/switch-tracking.cmodified+1−1View file
tools/perf/tests/symbols.cmodified+9−3View file
tools/perf/tests/task-exit.cmodified+0−1View file
tools/perf/tests/tests-scripts.cmodified+1−1View file
tools/perf/tests/tests.hmodified+11−0View file
tools/perf/tests/thread-map.cmodified+1−1View file
tools/perf/tests/topology.cmodified+18−21View file
tools/perf/tests/util.cmodified+44−1View file
tools/perf/tests/workloads/noploop.cmodified+2−0View file
tools/perf/trace/beauty/Buildmodified+1−1View file
tools/perf/ui/browser.hmodified+2−2View file
tools/perf/ui/browsers/annotate.cmodified+83−3View file
tools/perf/ui/browsers/header.cmodified+1−3View file
tools/perf/ui/browsers/hists.cmodified+1−1View file
tools/perf/ui/browsers/scripts.cmodified+1−1View file
tools/perf/ui/tui/setup.cmodified+1−1View file
tools/perf/util/Buildmodified+5−1View file
tools/perf/util/affinity.cmodified+18−0View file
tools/perf/util/affinity.hmodified+2−0View file
tools/perf/util/amd-sample-raw.cmodified+1−1View file
tools/perf/util/annotate.cmodified+2−0View file
tools/perf/util/annotate.hmodified+1−0View file
tools/perf/util/arm-spe.cmodified+1−1View file
tools/perf/util/auxtrace.cmodified+7−6View file
tools/perf/util/auxtrace.hmodified+4−2View file
tools/perf/util/bpf-event.cmodified+379−1View file
tools/perf/util/bpf-event.hmodified+13−0View file
tools/perf/util/bpf-filter.cmodified+29−1View file
tools/perf/util/bpf-filter.hmodified+3−0View file
tools/perf/util/bpf_ftrace.cmodified+55−20View file
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.cmodified+2−1View file
tools/perf/util/bpf_skel/func_latency.bpf.cmodified+95−53View file
tools/perf/util/bpf_skel/perf_version.hadded+17−0View file
tools/perf/util/bpf_trace_augment.cadded+143−0View file
tools/perf/util/branch.cmodified+1−1View file
tools/perf/util/build-id.cmodified+38−27View file
tools/perf/util/build-id.hmodified+4−4View file
tools/perf/util/cap.cmodified+0−1View file
tools/perf/util/cap.hmodified+5−0View file
tools/perf/util/cgroup.cmodified+8−15View file
tools/perf/util/cgroup.hmodified+1−2View file
tools/perf/util/comm.cmodified+2−0View file
tools/perf/util/data-convert-bt.cmodified+8−8View file
tools/perf/util/data-convert-json.cmodified+18−18View file
tools/perf/util/db-export.cmodified+8−3View file
tools/perf/util/debug.cmodified+64−11View file
tools/perf/util/debug.hmodified+1−0View file
tools/perf/util/debuginfo.cmodified+1−1View file
tools/perf/util/disasm.cmodified+8−1View file
tools/perf/util/dlfilter.cmodified+1−1View file
tools/perf/util/drm_pmu.cadded+686−0View file
tools/perf/util/drm_pmu.hadded+39−0View file
tools/perf/util/dso.cmodified+65−50View file
tools/perf/util/dso.hmodified+41−34View file
tools/perf/util/dsos.cmodified+11−9View file
tools/perf/util/env.cmodified+129−3View file
tools/perf/util/env.hmodified+7−2View file
tools/perf/util/event.cmodified+22−1View file
tools/perf/util/event.hmodified+1−5View file
tools/perf/util/evlist.cmodified+5−16View file
tools/perf/util/evlist.hmodified+8−1View file
tools/perf/util/evsel.cmodified+89−36View file
tools/perf/util/evsel.hmodified+8−0View file
tools/perf/util/expr.cmodified+6−2View file
tools/perf/util/ftrace.hmodified+5−0View file
tools/perf/util/genelf.cmodified+4−83View file
tools/perf/util/header.cmodified+145−111View file
tools/perf/util/header.hmodified+1−0View file
tools/perf/util/hist.cmodified+2−2View file
tools/perf/util/hist.hmodified+2−1View file
tools/perf/util/hwmon_pmu.cmodified+29−11View file
tools/perf/util/hwmon_pmu.hmodified+2−2View file
tools/perf/util/intel-tpebs.cmodified+2−2View file
tools/perf/util/jitdump.cmodified+17−4View file
tools/perf/util/machine.cmodified+22−22View file
tools/perf/util/machine.hmodified+3−3View file
tools/perf/util/map.cmodified+7−8View file
tools/perf/util/map.hmodified+2−3View file
tools/perf/util/metricgroup.cmodified+48−229View file
tools/perf/util/metricgroup.hmodified+5−5View file
tools/perf/util/parse-events.cmodified+228−210View file
tools/perf/util/parse-events.hmodified+3−2View file
tools/perf/util/parse-events.lmodified+13−25View file
tools/perf/util/parse-events.ymodified+11−18View file
tools/perf/util/pfm.cmodified+2−4View file
tools/perf/util/pmu.cmodified+57−6View file
tools/perf/util/pmu.hmodified+3−2View file
tools/perf/util/pmus.cmodified+120−14View file
tools/perf/util/pmus.hmodified+6−1View file
tools/perf/util/print-events.cmodified+138−95View file
tools/perf/util/print-events.hmodified+2−2View file
tools/perf/util/probe-event.cmodified+8−4View file
tools/perf/util/probe-file.cmodified+2−2View file
tools/perf/util/probe-finder.cmodified+3−2View file
tools/perf/util/python.cmodified+129−16View file
tools/perf/util/s390-cpumsf.cmodified+1−1View file
tools/perf/util/sample-raw.cmodified+4−3View file
tools/perf/util/sample-raw.hmodified+1−1View file
tools/perf/util/sample.hmodified+2−4View file
tools/perf/util/scripting-engines/trace-event-python.cmodified+4−5View file
tools/perf/util/session.cmodified+18−5View file
tools/perf/util/session.hmodified+5−2View file
tools/perf/util/sha1.cadded+97−0View file
tools/perf/util/sha1.hadded+6−0View file
tools/perf/util/sort.cmodified+62−33View file
tools/perf/util/sort.hmodified+3−2View file
tools/perf/util/spark.cmodified+3−5View file
tools/perf/util/spark.hmodified+1−0View file
tools/perf/util/srcline.cmodified+5−5View file
tools/perf/util/stat-display.cmodified+23−27View file
tools/perf/util/stat-shadow.cmodified+5−7View file
tools/perf/util/stat.cmodified+3−5View file
tools/perf/util/stat.hmodified+3−9View file
tools/perf/util/symbol-minimal.cmodified+1−1View file
tools/perf/util/symbol.cmodified+6−4View file
tools/perf/util/symbol_conf.hmodified+1−1View file
tools/perf/util/synthetic-events.cmodified+37−21View file
tools/perf/util/synthetic-events.hmodified+2−0View file
tools/perf/util/target.cmodified+6−48View file
tools/perf/util/target.hmodified+3−12View file
tools/perf/util/thread.cmodified+22−4View file
tools/perf/util/thread.hmodified+5−4View file
tools/perf/util/thread_map.cmodified+3−29View file
tools/perf/util/thread_map.hmodified+2−4View file
tools/perf/util/tool.cmodified+15−1View file
tools/perf/util/tool.hmodified+2−1View file
tools/perf/util/tool_pmu.cmodified+49−7View file
tools/perf/util/tool_pmu.hmodified+1−1View file
tools/perf/util/top.cmodified+2−2View file
tools/perf/util/top.hmodified+1−0View file
tools/perf/util/tp_pmu.cadded+210−0View file
tools/perf/util/tp_pmu.hadded+19−0View file
tools/perf/util/trace_augment.hmodified+61−1View file
tools/perf/util/unwind-libdw.cmodified+5−2View file

Only the first 600 diff lines are shown. Download the complete patch.

tools/build/Makefile.feature

View file
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 57bd995..649c5ab 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -86,7 +86,6 @@ FEATURE_TESTS_BASIC := \
libtraceevent \
libtracefs \
libcpupower \
- libcrypto \
pthread-attr-setaffinity-np \
pthread-barrier \
reallocarray \
@@ -126,12 +125,7 @@ FEATURE_TESTS_EXTRA := \
llvm \
clang \
libbpf \
- libbpf-btf__load_from_kernel_by_id \
- libbpf-bpf_prog_load \
- libbpf-bpf_object__next_program \
- libbpf-bpf_object__next_map \
- libbpf-bpf_program__set_insns \
- libbpf-bpf_create_map \
+ libbpf-strings \
libpfm4 \
libdebuginfod \
clang-bpf-co-re \
@@ -152,7 +146,6 @@ FEATURE_DISPLAY ?= \
numa_num_possible_cpus \
libperl \
libpython \
- libcrypto \
libcapstone \
llvm-perf \
zlib \

tools/build/feature/Makefile

View file
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index b8b5fb1..b41a428 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -38,7 +38,6 @@ FILES= \
test-libtraceevent.bin \
test-libcpupower.bin \
test-libtracefs.bin \
- test-libcrypto.bin \
test-libunwind.bin \
test-libunwind-debug-frame.bin \
test-libunwind-x86.bin \
@@ -59,6 +58,7 @@ FILES= \
test-lzma.bin \
test-bpf.bin \
test-libbpf.bin \
+ test-libbpf-strings.bin \
test-get_cpuid.bin \
test-sdt.bin \
test-cxx.bin \
@@ -246,9 +246,6 @@ $(OUTPUT)test-libcpupower.bin:
$(OUTPUT)test-libtracefs.bin:
$(BUILD) $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null) -ltracefs
-$(OUTPUT)test-libcrypto.bin:
- $(BUILD) -lcrypto
-
$(OUTPUT)test-gtk2.bin:
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
@@ -339,26 +336,8 @@ $(OUTPUT)test-bpf.bin:
$(OUTPUT)test-libbpf.bin:
$(BUILD) -lbpf
-$(OUTPUT)test-libbpf-btf__load_from_kernel_by_id.bin:
- $(BUILD) -lbpf
-
-$(OUTPUT)test-libbpf-bpf_prog_load.bin:
- $(BUILD) -lbpf
-
-$(OUTPUT)test-libbpf-bpf_map_create.bin:
- $(BUILD) -lbpf
-
-$(OUTPUT)test-libbpf-bpf_object__next_program.bin:
- $(BUILD) -lbpf
-
-$(OUTPUT)test-libbpf-bpf_object__next_map.bin:
- $(BUILD) -lbpf
-
-$(OUTPUT)test-libbpf-bpf_program__set_insns.bin:
- $(BUILD) -lbpf
-
-$(OUTPUT)test-libbpf-btf__raw_data.bin:
- $(BUILD) -lbpf
+$(OUTPUT)test-libbpf-strings.bin:
+ $(BUILD)
$(OUTPUT)test-sdt.bin:
$(BUILD)

tools/build/feature/test-all.c

View file
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 03ddaac..4419fb4 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -66,14 +66,6 @@
# include "test-libslang.c"
#undef main
-#define main main_test_libbfd
-# include "test-libbfd.c"
-#undef main
-
-#define main main_test_libbfd_buildid
-# include "test-libbfd-buildid.c"
-#undef main
-
#define main main_test_backtrace
# include "test-backtrace.c"
#undef main
@@ -138,10 +130,6 @@
# include "test-bpf.c"
#undef main
-#define main main_test_libcrypto
-# include "test-libcrypto.c"
-#undef main
-
#define main main_test_sdt
# include "test-sdt.c"
#undef main
@@ -158,14 +146,6 @@
# include "test-reallocarray.c"
#undef main
-#define main main_test_disassembler_four_args
-# include "test-disassembler-four-args.c"
-#undef main
-
-#define main main_test_disassembler_init_styled
-# include "test-disassembler-init-styled.c"
-#undef main
-
#define main main_test_libzstd
# include "test-libzstd.c"
#undef main
@@ -193,8 +173,6 @@ int main(int argc, char *argv[])
main_test_libelf_gelf_getnote();
main_test_libelf_getshdrstrndx();
main_test_libslang();
- main_test_libbfd();
- main_test_libbfd_buildid();
main_test_backtrace();
main_test_libnuma();
main_test_numa_num_possible_cpus();
@@ -206,14 +184,12 @@ int main(int argc, char *argv[])
main_test_lzma();
main_test_get_cpuid();
main_test_bpf();
- main_test_libcrypto();
main_test_scandirat();
main_test_sched_getcpu();
main_test_sdt();
main_test_setns();
main_test_libaio();
main_test_reallocarray();
- main_test_disassembler_four_args();
main_test_libzstd();
main_test_libtraceevent();
main_test_libtracefs();

tools/build/feature/test-libbpf-strings.c

View file
diff --git a/tools/build/feature/test-libbpf-strings.c b/tools/build/feature/test-libbpf-strings.c
new file mode 100644
index 0000000..83e6c45
--- /dev/null
+++ b/tools/build/feature/test-libbpf-strings.c
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <bpf/btf.h>
+
+int main(void)
+{
+ struct btf_dump_type_data_opts opts;
+
+ opts.emit_strings = 0;
+ return opts.emit_strings;
+}

tools/build/feature/test-libcrypto.c

View before deletion
diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c
deleted file mode 100644
index bc34a5b..0000000
--- a/tools/build/feature/test-libcrypto.c
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <openssl/evp.h>
-#include <openssl/sha.h>
-#include <openssl/md5.h>
-
-int main(void)
-{
- EVP_MD_CTX *mdctx;
- unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH];
- unsigned char dat[] = "12345";
- unsigned int digest_len;
-
- mdctx = EVP_MD_CTX_new();
- if (!mdctx)
- return 0;
-
- EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
- EVP_DigestUpdate(mdctx, &dat[0], sizeof(dat));
- EVP_DigestFinal_ex(mdctx, &md[0], &digest_len);
- EVP_MD_CTX_free(mdctx);
-
- SHA1(&dat[0], sizeof(dat), &md[0]);
-
- return 0;
-}

tools/lib/perf/evlist.c

View file
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
index b1f4c81..3ed023f 100644
--- a/tools/lib/perf/evlist.c
+++ b/tools/lib/perf/evlist.c
@@ -36,49 +36,88 @@ void perf_evlist__init(struct perf_evlist *evlist)
static void __perf_evlist__propagate_maps(struct perf_evlist *evlist,
struct perf_evsel *evsel)
{
- if (evsel->system_wide) {
- /* System wide: set the cpu map of the evsel to all online CPUs. */
- perf_cpu_map__put(evsel->cpus);
- evsel->cpus = perf_cpu_map__new_online_cpus();
- } else if (evlist->has_user_cpus && evsel->is_pmu_core) {
- /*
- * User requested CPUs on a core PMU, ensure the requested CPUs
- * are valid by intersecting with those of the PMU.
- */
+ if (perf_cpu_map__is_empty(evsel->cpus)) {
+ if (perf_cpu_map__is_empty(evsel->pmu_cpus)) {
+ /*
+ * Assume the unset PMU cpus were for a system-wide
+ * event, like a software or tracepoint.
+ */
+ evsel->pmu_cpus = perf_cpu_map__new_online_cpus();
+ }
+ if (evlist->has_user_cpus && !evsel->system_wide) {
+ /*
+ * Use the user CPUs unless the evsel is set to be
+ * system wide, such as the dummy event.
+ */
+ evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
+ } else {
+ /*
+ * System wide and other modes, assume the cpu map
+ * should be set to all PMU CPUs.
+ */
+ evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus);
+ }
+ }
+ /*
+ * Avoid "any CPU"(-1) for uncore and PMUs that require a CPU, even if
+ * requested.
+ */
+ if (evsel->requires_cpu && perf_cpu_map__has_any_cpu(evsel->cpus)) {
perf_cpu_map__put(evsel->cpus);
- evsel->cpus = perf_cpu_map__intersect(evlist->user_requested_cpus, evsel->own_cpus);
+ evsel->cpus = perf_cpu_map__get(evsel->pmu_cpus);
+ }
- /*
- * Empty cpu lists would eventually get opened as "any" so remove
- * genuinely empty ones before they're opened in the wrong place.
- */
- if (perf_cpu_map__is_empty(evsel->cpus)) {
- struct perf_evsel *next = perf_evlist__next(evlist, evsel);
-
- perf_evlist__remove(evlist, evsel);
- /* Keep idx contiguous */
- if (next)
- list_for_each_entry_from(next, &evlist->entries, node)
- next->idx--;
+ /*
+ * Globally requested CPUs replace user requested unless the evsel is
+ * set to be system wide.
+ */
+ if (evlist->has_user_cpus && !evsel->system_wide) {
+ assert(!perf_cpu_map__has_any_cpu(evlist->user_requested_cpus));
+ if (!perf_cpu_map__equal(evsel->cpus, evlist->user_requested_cpus)) {
+ perf_cpu_map__put(evsel->cpus);
+ evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
}
- } else if (!evsel->own_cpus || evlist->has_user_cpus ||
- (!evsel->requires_cpu && perf_cpu_map__has_any_cpu(evlist->user_requested_cpus))) {
- /*
- * The PMU didn't specify a default cpu map, this isn't a core
- * event and the user requested CPUs or the evlist user
- * requested CPUs have the "any CPU" (aka dummy) CPU value. In
- * which case use the user requested CPUs rather than the PMU
- * ones.
- */
+ }
+
+ /* Ensure cpus only references valid PMU CPUs. */
+ if (!perf_cpu_map__has_any_cpu(evsel->cpus) &&
+ !perf_cpu_map__is_subset(evsel->pmu_cpus, evsel->cpus)) {
+ struct perf_cpu_map *tmp = perf_cpu_map__intersect(evsel->pmu_cpus, evsel->cpus);
+
perf_cpu_map__put(evsel->cpus);
- evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
- } else if (evsel->cpus != evsel->own_cpus) {
- /*
- * No user requested cpu map but the PMU cpu map doesn't match
- * the evsel's. Reset it back to the PMU cpu map.
- */
+ evsel->cpus = tmp;
+ }
+
+ /*
+ * Was event requested on all the PMU's CPUs but the user requested is
+ * any CPU (-1)? If so switch to using any CPU (-1) to reduce the number
+ * of events.
+ */
+ if (!evsel->system_wide &&
+ !evsel->requires_cpu &&
+ perf_cpu_map__equal(evsel->cpus, evsel->pmu_cpus) &&
+ perf_cpu_map__has_any_cpu(evlist->user_requested_cpus)) {
perf_cpu_map__put(evsel->cpus);
- evsel->cpus = perf_cpu_map__get(evsel->own_cpus);
+ evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
+ }
+
+ /* Sanity check assert before the evsel is potentially removed. */
+ assert(!evsel->requires_cpu || !perf_cpu_map__has_any_cpu(evsel->cpus));
+
+ /*
+ * Empty cpu lists would eventually get opened as "any" so remove
+ * genuinely empty ones before they're opened in the wrong place.
+ */
+ if (perf_cpu_map__is_empty(evsel->cpus)) {
+ struct perf_evsel *next = perf_evlist__next(evlist, evsel);
+
+ perf_evlist__remove(evlist, evsel);
+ /* Keep idx contiguous */
+ if (next)
+ list_for_each_entry_from(next, &evlist->entries, node)
+ next->idx--;
+
+ return;
}
if (evsel->system_wide) {
@@ -98,6 +137,10 @@ static void perf_evlist__propagate_maps(struct perf_evlist *evlist)
evlist->needs_map_propagation = true;
+ /* Clear the all_cpus set which will be merged into during propagation. */
+ perf_cpu_map__put(evlist->all_cpus);
+ evlist->all_cpus = NULL;
+
list_for_each_entry_safe(evsel, n, &evlist->entries, node)
__perf_evlist__propagate_maps(evlist, evsel);
}

tools/lib/perf/evsel.c

View file
diff --git a/tools/lib/perf/evsel.c b/tools/lib/perf/evsel.c
index c475319..13a307f 100644
--- a/tools/lib/perf/evsel.c
+++ b/tools/lib/perf/evsel.c
@@ -40,8 +40,19 @@ struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr)
return evsel;
}
+void perf_evsel__exit(struct perf_evsel *evsel)
+{
+ assert(evsel->fd == NULL); /* If not fds were not closed. */
+ assert(evsel->mmap == NULL); /* If not munmap wasn't called. */
+ assert(evsel->sample_id == NULL); /* If not free_id wasn't called. */
+ perf_cpu_map__put(evsel->cpus);
+ perf_cpu_map__put(evsel->pmu_cpus);
+ perf_thread_map__put(evsel->threads);
+}
+
void perf_evsel__delete(struct perf_evsel *evsel)
{
+ perf_evsel__exit(evsel);
free(evsel);
}

tools/lib/perf/include/internal/evsel.h

View file
diff --git a/tools/lib/perf/include/internal/evsel.h b/tools/lib/perf/include/internal/evsel.h
index ea78def..fefe64b 100644
--- a/tools/lib/perf/include/internal/evsel.h
+++ b/tools/lib/perf/include/internal/evsel.h
@@ -99,7 +99,7 @@ struct perf_evsel {
* cpu map for opening the event on, for example, the first CPU on a
* socket for an uncore event.
*/
- struct perf_cpu_map *own_cpus;
+ struct perf_cpu_map *pmu_cpus;
struct perf_thread_map *threads;
struct xyarray *fd;
struct xyarray *mmap;
@@ -133,6 +133,7 @@ struct perf_evsel {
void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr,
int idx);
+void perf_evsel__exit(struct perf_evsel *evsel);
int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
void perf_evsel__close_fd(struct perf_evsel *evsel);
void perf_evsel__free_fd(struct perf_evsel *evsel);

tools/lib/perf/include/perf/event.h

View file
diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/perf/event.h
index 09b7c64..6608f1e 100644
--- a/tools/lib/perf/include/perf/event.h
+++ b/tools/lib/perf/include/perf/event.h
@@ -467,6 +467,22 @@ struct perf_record_compressed2 {
char data[];
};
+#define BPF_METADATA_KEY_LEN 64
+#define BPF_METADATA_VALUE_LEN 256
+#define BPF_PROG_NAME_LEN KSYM_NAME_LEN
+
+struct perf_record_bpf_metadata_entry {
+ char key[BPF_METADATA_KEY_LEN];
+ char value[BPF_METADATA_VALUE_LEN];
+};
+
+struct perf_record_bpf_metadata {
+ struct perf_event_header header;
+ char prog_name[BPF_PROG_NAME_LEN];
+ __u64 nr_entries;
+ struct perf_record_bpf_metadata_entry entries[];
+};
+
enum perf_user_event_type { /* above any possible kernel type */
PERF_RECORD_USER_TYPE_START = 64,
PERF_RECORD_HEADER_ATTR = 64,
@@ -489,6 +505,7 @@ enum perf_user_event_type { /* above any possible kernel type */
PERF_RECORD_COMPRESSED = 81,
PERF_RECORD_FINISHED_INIT = 82,
PERF_RECORD_COMPRESSED2 = 83,
+ PERF_RECORD_BPF_METADATA = 84,
PERF_RECORD_HEADER_MAX
};
@@ -530,6 +547,7 @@ union perf_event {
struct perf_record_header_feature feat;
struct perf_record_compressed pack;
struct perf_record_compressed2 pack2;
+ struct perf_record_bpf_metadata bpf_metadata;
};
#endif /* __LIBPERF_EVENT_H */

tools/lib/subcmd/help.c

View file
diff --git a/tools/lib/subcmd/help.c b/tools/lib/subcmd/help.c
index 8561b0f..9ef5694 100644
--- a/tools/lib/subcmd/help.c
+++ b/tools/lib/subcmd/help.c
@@ -9,6 +9,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
+#include <assert.h>
#include "subcmd-util.h"
#include "help.h"
#include "exec-cmd.h"
@@ -82,10 +83,11 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
ci++;
cj++;
} else {
- zfree(&cmds->names[cj]);
- cmds->names[cj++] = cmds->names[ci++];
+ cmds->names[cj++] = cmds->names[ci];
+ cmds->names[ci++] = NULL;
}
} else if (cmp == 0) {
+ zfree(&cmds->names[ci]);
ci++;
ei++;
} else if (cmp > 0) {
@@ -94,12 +96,12 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
}
if (ci != cj) {
while (ci < cmds->cnt) {
- zfree(&cmds->names[cj]);
- cmds->names[cj++] = cmds->names[ci++];
+ cmds->names[cj++] = cmds->names[ci];
+ cmds->names[ci++] = NULL;
}
}
for (ci = cj; ci < cmds->cnt; ci++)
- zfree(&cmds->names[ci]);
+ assert(cmds->names[ci] == NULL);
cmds->cnt = cj;
}

tools/lib/subcmd/run-command.c

View file
diff --git a/tools/lib/subcmd/run-command.c b/tools/lib/subcmd/run-command.c
index 0a764c2..b7510f8 100644
--- a/tools/lib/subcmd/run-command.c
+++ b/tools/lib/subcmd/run-command.c
@@ -5,6 +5,7 @@
#include <ctype.h>
#include <fcntl.h>
#include <string.h>
+#include <linux/compiler.h>
#include <linux/string.h>
#include <errno.h>
#include <sys/wait.h>
@@ -216,10 +217,20 @@ static int wait_or_whine(struct child_process *cmd, bool block)
return result;
}
+/*
+ * Conservative estimate of number of characaters needed to hold an a decoded
+ * integer, assume each 3 bits needs a character byte and plus a possible sign
+ * character.
+ */
+#ifndef is_signed_type
+#define is_signed_type(type) (((type)(-1)) < (type)1)
+#endif
+#define MAX_STRLEN_TYPE(type) (sizeof(type) * 8 / 3 + (is_signed_type(type) ? 1 : 0))
+
int check_if_command_finished(struct child_process *cmd)
{
#ifdef __linux__
- char filename[FILENAME_MAX + 12];
+ char filename[6 + MAX_STRLEN_TYPE(typeof(cmd->pid)) + 7 + 1];
char status_line[256];
FILE *status_file;
@@ -227,7 +238,7 @@ int check_if_command_finished(struct child_process *cmd)
* Check by reading /proc/<pid>/status as calling waitpid causes
* stdout/stderr to be closed and data lost.
*/
- sprintf(filename, "/proc/%d/status", cmd->pid);
+ sprintf(filename, "/proc/%u/status", cmd->pid);
status_file = fopen(filename, "r");
if (status_file == NULL) {
/* Open failed assume finish_command was called. */

tools/perf/.gitignore

View file
diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore
index 5aaf73d..b64302a 100644
--- a/tools/perf/.gitignore
+++ b/tools/perf/.gitignore
@@ -48,8 +48,6 @@ libbpf/
libperf/
libsubcmd/
libsymbol/
-libtraceevent/
-libtraceevent_plugins/
fixdep
Documentation/doc.dep
python_ext_build/

tools/perf/Build

View file
diff --git a/tools/perf/Build b/tools/perf/Build
index 06107f1..b03cc59 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -73,7 +73,7 @@ endif
$(OUTPUT)%.shellcheck_log: %
$(call rule_mkdir)
- $(Q)$(call echo-cmd,test)shellcheck -s bash -a -S warning "$<" > $@ || (cat $@ && rm $@ && false)
+ $(Q)$(call echo-cmd,test)$(SHELLCHECK) "$<" > $@ || (cat $@ && rm $@ && false)
perf-y += $(SHELL_TEST_LOGS)

tools/perf/Documentation/perf-check.txt

View file
diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documentation/perf-check.txt
index a764a46..ee92042 100644
--- a/tools/perf/Documentation/perf-check.txt
+++ b/tools/perf/Documentation/perf-check.txt
@@ -52,8 +52,8 @@ feature::
dwarf-unwind / HAVE_DWARF_UNWIND_SUPPORT
auxtrace / HAVE_AUXTRACE_SUPPORT
libbfd / HAVE_LIBBFD_SUPPORT
+ libbpf-strings / HAVE_LIBBPF_STRINGS_SUPPORT
libcapstone / HAVE_LIBCAPSTONE_SUPPORT
- libcrypto / HAVE_LIBCRYPTO_SUPPORT
libdw-dwarf-unwind / HAVE_LIBDW_SUPPORT
libelf / HAVE_LIBELF_SUPPORT
libnuma / HAVE_LIBNUMA_SUPPORT

tools/perf/Documentation/perf-ftrace.txt

View file
diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools/perf/Documentation/perf-ftrace.txt
index b77f58c..3f3808e 100644
--- a/tools/perf/Documentation/perf-ftrace.txt
+++ b/tools/perf/Documentation/perf-ftrace.txt
@@ -123,6 +123,10 @@ OPTIONS for 'perf ftrace trace'
--graph-opts::
List of options allowed to set:
+ - args - Show function arguments.
+ - retval - Show function return value.
+ - retval-hex - Show function return value in hexadecimal format.
+ - retaddr - Show function return address.
- nosleep-time - Measure on-CPU time only for function_graph tracer.
- noirqs - Ignore functions that happen inside interrupt.
- verbose - Show process names, PIDs, timestamps, etc.
@@ -139,6 +143,12 @@ OPTIONS for 'perf ftrace latency'
Set the function name to get the histogram. Unlike perf ftrace trace,
it only allows single function to calculate the histogram.
+-e::
+--events=::
+ Set the pair of events to get the histogram. The histogram is calculated
+ by the time difference between the two events from the same thread. This
+ requires -b/--use-bpf option.
+
-b::
--use-bpf::
Use BPF to measure function latency instead of using the ftrace (it

tools/perf/Documentation/perf-list.txt

View file
diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index ce07350..2821530 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -278,26 +278,33 @@ also be supplied. For example:
perf stat -C 0 -e 'hv_gpci/dtbp_ptitc,phys_processor_idx=0x2/' ...

This diff is incomplete. Download the complete patch.

tools/perf/Documentation/perf-record.txt

View file

This diff is incomplete. Download the complete patch.

tools/perf/Documentation/perf-stat.txt

View file

This diff is incomplete. Download the complete patch.

tools/perf/Documentation/perf-trace.txt

View file

This diff is incomplete. Download the complete patch.

tools/perf/Makefile.config

View file

This diff is incomplete. Download the complete patch.

tools/perf/Makefile.perf

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/powerpc/util/Build

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/powerpc/util/event.c

View before deletion

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/Build

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/include/arch-tests.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/tests/Build

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/tests/arch-tests.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/tests/sample-parsing.c

View before deletion

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/tests/topdown.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/util/event.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/util/evlist.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/util/evsel.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/util/topdown.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/util/topdown.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/bench/evlist-open-close.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/bench/inject-buildid.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/bench/synthesize.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-annotate.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-buildid-cache.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-buildid-list.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-c2c.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-check.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-diff.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-ftrace.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-inject.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-kallsyms.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-kmem.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-kvm.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-kwork.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-list.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-lock.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-mem.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-record.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-report.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-sched.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-script.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-stat.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-timechart.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-top.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-trace.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/check-headers.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/include/perf/perf_dlfilter.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/jvmti/libjvmti.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/perf-archive.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/perf.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/common-and-microarch.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/core-imp-def.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/cycle_accounting.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/exception.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/fp_operation.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l1d_cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l1i_cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l2_cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/l3_cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/ll_cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/spec_operation.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/stall.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/sve.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/fujitsu/monaka/tlb.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/common/common/software.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/cf_z16/pai_crypto.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/cf_z17/basic.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/cf_z17/crypto6.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/cf_z17/extended.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/cf_z17/pai_crypto.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/cf_z17/pai_ext.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/cf_z17/transaction.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/s390/mapfile.csv

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlake/cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlake/floating-point.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlake/other.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlake/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlake/virtual-memory.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlaken/cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlaken/floating-point.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlaken/other.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlaken/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/alderlaken/virtual-memory.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/arrowlake/cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/arrowlake/frontend.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/cascadelakex/floating-point.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/cascadelakex/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/emeraldrapids/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/emeraldrapids/uncore-io.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/emeraldrapids/uncore-memory.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/grandridge/grr-metrics.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/grandridge/uncore-interconnect.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/grandridge/uncore-io.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/graniterapids/cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/graniterapids/counter.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/graniterapids/gnr-metrics.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/graniterapids/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/graniterapids/uncore-interconnect.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/graniterapids/uncore-io.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/icelakex/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/icelakex/uncore-cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/lunarlake/cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/lunarlake/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/lunarlake/virtual-memory.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/mapfile.csv

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/meteorlake/cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/meteorlake/frontend.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/meteorlake/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/pantherlake/cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/pantherlake/counter.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/pantherlake/frontend.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/pantherlake/memory.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/pantherlake/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/pantherlake/virtual-memory.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sapphirerapids/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sapphirerapids/uncore-io.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sapphirerapids/uncore-memory.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sierraforest/frontend.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sierraforest/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sierraforest/srf-metrics.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sierraforest/uncore-cache.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sierraforest/uncore-interconnect.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/sierraforest/uncore-io.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/skylakex/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/x86/tigerlake/pipeline.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/empty-pmu-events.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/jevents.py

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/pmu-events.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/scripts/python/flamegraph.py

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/Build

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/backward-ring-buffer.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/bp_account.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/builtin-test.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/code-reading.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/dlfilter-test.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/dwarf-unwind.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/event-times.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/event_update.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/expand-cgroup.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/hists_cumulate.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/hists_filter.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/hists_link.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/hists_output.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/hwmon_pmu.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/keep-tracking.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/make

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/mmap-basic.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/mmap-thread-lookup.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/openat-syscall-all-cpus.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/openat-syscall-tp-fields.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/openat-syscall.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/parse-events.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/parse-metric.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/pe-file-parsing.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/perf-record.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/perf-targz-src-pkg

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/perf-time-to-tsc.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/pmu-events.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/sample-parsing.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/sdt.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/amd-ibs-swfilt.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/annotate.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/buildid.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/coresight/asm_pure_loop.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/diff.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/drm_pmu.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/ftrace.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/header.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/lib/perf_has_symbol.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/lib/perf_json_output_lint.py

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/lib/probe_vfs_getname.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/lib/setup_python.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/lib/waiting.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/list.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/lock_contention.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/perf-report-hierarchy.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/probe_vfs_getname.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/record+probe_libc_inet_pton.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/record+script_probe_vfs_getname.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/record+zstd_comp_decomp.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/record.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/record_bpf_filter.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/record_offcpu.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/record_sideband.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/sched.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/script.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/stat+csv_summary.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/stat+shadow_stat.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/stat_all_pfm.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/stat_bpf_counters.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/stat_bpf_counters_cgrp.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/test_arm_callgraph_fp.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/test_arm_coresight.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/test_arm_coresight_disasm.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/test_arm_spe.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/test_arm_spe_fork.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/test_bpf_metadata.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/test_intel_pt.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/trace+probe_vfs_getname.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/trace_btf_enum.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/trace_btf_general.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/trace_exit_race.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/trace_record_replay.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/shell/trace_summary.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/subcmd-help.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/switch-tracking.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/symbols.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/task-exit.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/tests-scripts.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/tests.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/thread-map.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/topology.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/util.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/workloads/noploop.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/trace/beauty/Build

View file

This diff is incomplete. Download the complete patch.

tools/perf/ui/browser.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/ui/browsers/annotate.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/ui/browsers/header.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/ui/browsers/hists.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/ui/browsers/scripts.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/ui/tui/setup.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/Build

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/affinity.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/affinity.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/amd-sample-raw.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/annotate.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/annotate.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/arm-spe.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/auxtrace.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/auxtrace.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf-event.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf-event.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf-filter.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf-filter.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf_ftrace.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf_skel/func_latency.bpf.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf_skel/perf_version.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf_trace_augment.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/branch.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/build-id.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/build-id.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/cap.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/cap.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/cgroup.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/cgroup.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/comm.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/data-convert-bt.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/data-convert-json.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/db-export.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/debug.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/debug.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/debuginfo.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/disasm.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/dlfilter.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/drm_pmu.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/drm_pmu.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/dso.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/dso.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/dsos.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/env.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/env.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/event.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/event.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/evlist.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/evlist.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/evsel.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/evsel.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/expr.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/ftrace.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/genelf.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/header.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/header.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/hist.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/hist.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/hwmon_pmu.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/hwmon_pmu.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/intel-tpebs.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/jitdump.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/machine.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/machine.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/map.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/map.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/metricgroup.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/metricgroup.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/parse-events.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/parse-events.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/parse-events.l

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/parse-events.y

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/pfm.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/pmu.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/pmu.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/pmus.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/pmus.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/print-events.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/print-events.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/probe-event.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/probe-file.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/probe-finder.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/python.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/s390-cpumsf.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sample-raw.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sample-raw.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sample.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/scripting-engines/trace-event-python.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/session.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/session.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sha1.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sha1.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sort.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sort.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/spark.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/spark.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/srcline.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/stat-display.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/stat-shadow.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/stat.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/stat.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/symbol-minimal.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/symbol.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/symbol_conf.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/synthetic-events.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/synthetic-events.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/target.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/target.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/thread.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/thread.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/thread_map.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/thread_map.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/tool.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/tool.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/tool_pmu.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/tool_pmu.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/top.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/top.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/tp_pmu.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/tp_pmu.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/trace_augment.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/unwind-libdw.c

View file

This diff is incomplete. Download the complete patch.