mirror of
https://github.com/torvalds/linux.git
synced 2026-08-11 01:41:40 +02:00
New features:
- Add 'trace' subcommand for 'perf ftrace', setting the stage for more
'perf ftrace' subcommands. Not using a subcommand yields the previous
behaviour of 'perf ftrace'.
- Add 'latency' subcommand to 'perf ftrace', that can use the function
graph tracer or a BPF optimized one, via the -b/--use-bpf option.
E.g.:
$ sudo perf ftrace latency -a -T mutex_lock sleep 1
# DURATION | COUNT | GRAPH |
0 - 1 us | 4596 | ######################## |
1 - 2 us | 1680 | ######### |
2 - 4 us | 1106 | ##### |
4 - 8 us | 546 | ## |
8 - 16 us | 562 | ### |
16 - 32 us | 1 | |
32 - 64 us | 0 | |
64 - 128 us | 0 | |
128 - 256 us | 0 | |
256 - 512 us | 0 | |
512 - 1024 us | 0 | |
1 - 2 ms | 0 | |
2 - 4 ms | 0 | |
4 - 8 ms | 0 | |
8 - 16 ms | 0 | |
16 - 32 ms | 0 | |
32 - 64 ms | 0 | |
64 - 128 ms | 0 | |
128 - 256 ms | 0 | |
256 - 512 ms | 0 | |
512 - 1024 ms | 0 | |
1 - ... s | 0 | |
The original implementation of this command was in the bcc tool.
- Support --cputype option for hybrid events in 'perf stat'.
Improvements:
- Call chain improvements for ARM64.
- No need to do any affinity setup when profiling pids.
- Reduce multiplexing with duration_time in 'perf stat' metrics.
- Improve error message for uncore events, stating that some event groups are
can only be used in system wide (-a) mode.
- perf stat metric group leader fixes/improvements, including arch specific
changes to better support Intel topdown events.
- Probe non-deprecated sysfs path 1st, i.e. try /sys/devices/system/cpu/cpuN/topology/thread_siblings
first, then the old /sys/devices/system/cpu/cpuN/topology/core_cpus.
- Disable debuginfod by default in 'perf record', to avoid stalls on distros
such as Fedora 35.
- Use unbuffered output in 'perf bench' when pipe/tee'ing to a file.
- Enable ignore_missing_thread in 'perf trace'
Fixes:
- Avoid TUI crash when navigating in the annotation of recursive functions.
- Fix hex dump character output in 'perf script'.
- Fix JSON indentation to 4 spaces standard in the ARM vendor event files.
- Fix use after free in metric__new().
- Fix IS_ERR_OR_NULL() usage in the perf BPF loader.
- Fix up cross-arch register support, i.e. when printing register names take
into account the architecture where the perf.data file was collected.
- Fix SMT fallback with large core counts.
- Don't lower case MetricExpr when parsing JSON files so as not to lose info
such as the ":G" event modifier in metrics.
perf test:
- Add basic stress test for sigtrap handling to 'perf test'.
- Fix 'perf test' failures on s/390
- Enable system wide for metricgroups test in 'perf test´.
- Use 3 digits for test numbering now we can have more tests.
Arch specific:
- Add events for Arm Neoverse N2 in the ARM JSON vendor event files
- Support PERF_MEM_LVLNUM encodings in powerpc, that came from a single
patch series, where I incorrectly merged the kernel bits, that were then
reverted after coordination with Michael Ellerman and Stephen Rothwell.
- Add ARM SPE total latency as PERF_SAMPLE_WEIGHT.
- Update AMD documentation, with info on raw event encoding.
- Add support for global and local variants of the "p_stage_cyc" sort key,
applicable to perf.data files collected on powerpc.
- Remove duplicate and incorrect aux size checks in the ARM CoreSight ETM code.
Refactorings:
- Add a perf_cpu abstraction to disambiguate CPUs and CPU map indexes, fixing
problems along the way.
- Document CPU map methods.
UAPI sync:
- Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy'
- Sync UAPI files with the kernel sources: drm, msr-index, cpufeatures.
Build system
- Enable warnings through HOSTCFLAGS.
- Drop requirement for libstdc++.so for libopencsd check
libperf:
- Make libperf adopt perf_counts_values__scale() from tools/perf/util/.
- Add a stat multiplexing test to libperf.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCYeQj6AAKCRCyPKLppCJ+
JwyWAQCBmU8OJxhSJQnNCwTB9zNkPPBbihvIztepOJ7zsw7JcQD+KfAidHGQvI/Y
EmXIYkmdNkWPYJafONllnKK5cckjxgI=
=aj9V
-----END PGP SIGNATURE-----
Merge tag 'perf-tools-for-v5.17-2022-01-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tool updates from Arnaldo Carvalho de Melo:
"New features:
- Add 'trace' subcommand for 'perf ftrace', setting the stage for
more 'perf ftrace' subcommands. Not using a subcommand yields the
previous behaviour of 'perf ftrace'.
- Add 'latency' subcommand to 'perf ftrace', that can use the
function graph tracer or a BPF optimized one, via the -b/--use-bpf
option.
E.g.:
$ sudo perf ftrace latency -a -T mutex_lock sleep 1
# DURATION | COUNT | GRAPH |
0 - 1 us | 4596 | ######################## |
1 - 2 us | 1680 | ######### |
2 - 4 us | 1106 | ##### |
4 - 8 us | 546 | ## |
8 - 16 us | 562 | ### |
16 - 32 us | 1 | |
32 - 64 us | 0 | |
64 - 128 us | 0 | |
128 - 256 us | 0 | |
256 - 512 us | 0 | |
512 - 1024 us | 0 | |
1 - 2 ms | 0 | |
2 - 4 ms | 0 | |
4 - 8 ms | 0 | |
8 - 16 ms | 0 | |
16 - 32 ms | 0 | |
32 - 64 ms | 0 | |
64 - 128 ms | 0 | |
128 - 256 ms | 0 | |
256 - 512 ms | 0 | |
512 - 1024 ms | 0 | |
1 - ... s | 0 | |
The original implementation of this command was in the bcc tool.
- Support --cputype option for hybrid events in 'perf stat'.
Improvements:
- Call chain improvements for ARM64.
- No need to do any affinity setup when profiling pids.
- Reduce multiplexing with duration_time in 'perf stat' metrics.
- Improve error message for uncore events, stating that some event
groups are can only be used in system wide (-a) mode.
- perf stat metric group leader fixes/improvements, including arch
specific changes to better support Intel topdown events.
- Probe non-deprecated sysfs path first, i.e. try the path
/sys/devices/system/cpu/cpuN/topology/thread_siblings first, then
the old /sys/devices/system/cpu/cpuN/topology/core_cpus.
- Disable debuginfod by default in 'perf record', to avoid stalls on
distros such as Fedora 35.
- Use unbuffered output in 'perf bench' when pipe/tee'ing to a file.
- Enable ignore_missing_thread in 'perf trace'
Fixes:
- Avoid TUI crash when navigating in the annotation of recursive
functions.
- Fix hex dump character output in 'perf script'.
- Fix JSON indentation to 4 spaces standard in the ARM vendor event
files.
- Fix use after free in metric__new().
- Fix IS_ERR_OR_NULL() usage in the perf BPF loader.
- Fix up cross-arch register support, i.e. when printing register
names take into account the architecture where the perf.data file
was collected.
- Fix SMT fallback with large core counts.
- Don't lower case MetricExpr when parsing JSON files so as not to
lose info such as the ":G" event modifier in metrics.
perf test:
- Add basic stress test for sigtrap handling to 'perf test'.
- Fix 'perf test' failures on s/390
- Enable system wide for metricgroups test in 'perf test´.
- Use 3 digits for test numbering now we can have more tests.
Arch specific:
- Add events for Arm Neoverse N2 in the ARM JSON vendor event files
- Support PERF_MEM_LVLNUM encodings in powerpc, that came from a
single patch series, where I incorrectly merged the kernel bits,
that were then reverted after coordination with Michael Ellerman
and Stephen Rothwell.
- Add ARM SPE total latency as PERF_SAMPLE_WEIGHT.
- Update AMD documentation, with info on raw event encoding.
- Add support for global and local variants of the "p_stage_cyc" sort
key, applicable to perf.data files collected on powerpc.
- Remove duplicate and incorrect aux size checks in the ARM CoreSight
ETM code.
Refactorings:
- Add a perf_cpu abstraction to disambiguate CPUs and CPU map
indexes, fixing problems along the way.
- Document CPU map methods.
UAPI sync:
- Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench
mem memcpy'
- Sync UAPI files with the kernel sources: drm, msr-index,
cpufeatures.
Build system
- Enable warnings through HOSTCFLAGS.
- Drop requirement for libstdc++.so for libopencsd check
libperf:
- Make libperf adopt perf_counts_values__scale() from tools/perf/util/.
- Add a stat multiplexing test to libperf"
* tag 'perf-tools-for-v5.17-2022-01-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (115 commits)
perf record: Disable debuginfod by default
perf evlist: No need to do any affinity setup when profiling pids
perf cpumap: Add is_dummy() method
perf metric: Fix metric_leader
perf cputopo: Fix CPU topology reading on s/390
perf metricgroup: Fix use after free in metric__new()
libperf tests: Update a use of the new cpumap API
perf arm: Fix off-by-one directory path
tools arch x86: Sync the msr-index.h copy with the kernel sources
tools headers cpufeatures: Sync with the kernel sources
tools headers UAPI: Update tools's copy of drm.h header
tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy'
perf pmu-events: Don't lower case MetricExpr
perf expr: Add debug logging for literals
perf tools: Probe non-deprecated sysfs path 1st
perf tools: Fix SMT fallback with large core counts
perf cpumap: Give CPUs their own type
perf stat: Correct first_shadow_cpu to return index
perf script: Fix flipped index and cpu
perf c2c: Use more intention revealing iterator
...
|
||
|---|---|---|
| .. | ||
| arm-spe-decoder | ||
| bpf_skel | ||
| c++ | ||
| cs-etm-decoder | ||
| include | ||
| intel-pt-decoder | ||
| libunwind | ||
| scripting-engines | ||
| affinity.c | ||
| affinity.h | ||
| amd-sample-raw.c | ||
| annotate.c | ||
| annotate.h | ||
| archinsn.h | ||
| arm-spe.c | ||
| arm-spe.h | ||
| arm64-frame-pointer-unwind-support.c | ||
| arm64-frame-pointer-unwind-support.h | ||
| auxtrace.c | ||
| auxtrace.h | ||
| block-info.c | ||
| block-info.h | ||
| block-range.c | ||
| block-range.h | ||
| bpf_counter_cgroup.c | ||
| bpf_counter.c | ||
| bpf_counter.h | ||
| bpf_ftrace.c | ||
| bpf_map.c | ||
| bpf_map.h | ||
| bpf-event.c | ||
| bpf-event.h | ||
| bpf-loader.c | ||
| bpf-loader.h | ||
| bpf-prologue.c | ||
| bpf-prologue.h | ||
| bpf-utils.c | ||
| bpf-utils.h | ||
| branch.c | ||
| branch.h | ||
| Build | ||
| build-id.c | ||
| build-id.h | ||
| cache.h | ||
| cacheline.c | ||
| cacheline.h | ||
| call-path.c | ||
| call-path.h | ||
| callchain.c | ||
| callchain.h | ||
| cap.c | ||
| cap.h | ||
| cgroup.c | ||
| cgroup.h | ||
| clockid.c | ||
| clockid.h | ||
| cloexec.c | ||
| cloexec.h | ||
| color_config.c | ||
| color.c | ||
| color.h | ||
| comm.c | ||
| comm.h | ||
| compress.h | ||
| config.c | ||
| config.h | ||
| copyfile.c | ||
| copyfile.h | ||
| counts.c | ||
| counts.h | ||
| cpu-set-sched.h | ||
| cpumap.c | ||
| cpumap.h | ||
| cputopo.c | ||
| cputopo.h | ||
| cs-etm.c | ||
| cs-etm.h | ||
| data-convert-bt.c | ||
| data-convert-json.c | ||
| data-convert.h | ||
| data.c | ||
| data.h | ||
| db-export.c | ||
| db-export.h | ||
| debug.c | ||
| debug.h | ||
| demangle-java.c | ||
| demangle-java.h | ||
| demangle-ocaml.c | ||
| demangle-ocaml.h | ||
| demangle-rust.c | ||
| demangle-rust.h | ||
| dlfilter.c | ||
| dlfilter.h | ||
| dso.c | ||
| dso.h | ||
| dsos.c | ||
| dsos.h | ||
| dump-insn.c | ||
| dump-insn.h | ||
| dwarf-aux.c | ||
| dwarf-aux.h | ||
| dwarf-regs.c | ||
| env.c | ||
| env.h | ||
| event.c | ||
| event.h | ||
| events_stats.h | ||
| evlist-hybrid.c | ||
| evlist-hybrid.h | ||
| evlist.c | ||
| evlist.h | ||
| evsel_config.h | ||
| evsel_fprintf.c | ||
| evsel_fprintf.h | ||
| evsel.c | ||
| evsel.h | ||
| evswitch.c | ||
| evswitch.h | ||
| expr.c | ||
| expr.h | ||
| expr.l | ||
| expr.y | ||
| find-map.c | ||
| fncache.c | ||
| fncache.h | ||
| ftrace.h | ||
| genelf_debug.c | ||
| genelf.c | ||
| genelf.h | ||
| generate-cmdlist.sh | ||
| get_current_dir_name.c | ||
| get_current_dir_name.h | ||
| hashmap.c | ||
| hashmap.h | ||
| header.c | ||
| header.h | ||
| help-unknown-cmd.c | ||
| help-unknown-cmd.h | ||
| hist.c | ||
| hist.h | ||
| intel-bts.c | ||
| intel-bts.h | ||
| intel-pt.c | ||
| intel-pt.h | ||
| intlist.c | ||
| intlist.h | ||
| iostat.c | ||
| iostat.h | ||
| jit.h | ||
| jitdump.c | ||
| jitdump.h | ||
| kvm-stat.h | ||
| levenshtein.c | ||
| levenshtein.h | ||
| llvm-utils.c | ||
| llvm-utils.h | ||
| lzma.c | ||
| machine.c | ||
| machine.h | ||
| map_symbol.h | ||
| map.c | ||
| map.h | ||
| maps.h | ||
| mem-events.c | ||
| mem-events.h | ||
| mem2node.c | ||
| mem2node.h | ||
| memswap.c | ||
| memswap.h | ||
| metricgroup.c | ||
| metricgroup.h | ||
| mmap.c | ||
| mmap.h | ||
| namespaces.c | ||
| namespaces.h | ||
| ordered-events.c | ||
| ordered-events.h | ||
| parse-branch-options.c | ||
| parse-branch-options.h | ||
| parse-events-hybrid.c | ||
| parse-events-hybrid.h | ||
| parse-events.c | ||
| parse-events.h | ||
| parse-events.l | ||
| parse-events.y | ||
| parse-regs-options.c | ||
| parse-regs-options.h | ||
| parse-sublevel-options.c | ||
| parse-sublevel-options.h | ||
| path.c | ||
| path.h | ||
| perf_api_probe.c | ||
| perf_api_probe.h | ||
| perf_event_attr_fprintf.c | ||
| perf_regs.c | ||
| perf_regs.h | ||
| perf-hooks-list.h | ||
| perf-hooks.c | ||
| perf-hooks.h | ||
| PERF-VERSION-GEN | ||
| pfm.c | ||
| pfm.h | ||
| pmu-hybrid.c | ||
| pmu-hybrid.h | ||
| pmu.c | ||
| pmu.h | ||
| pmu.l | ||
| pmu.y | ||
| print_binary.c | ||
| print_binary.h | ||
| probe-event.c | ||
| probe-event.h | ||
| probe-file.c | ||
| probe-file.h | ||
| probe-finder.c | ||
| probe-finder.h | ||
| pstack.c | ||
| pstack.h | ||
| python-ext-sources | ||
| python.c | ||
| rb_resort.h | ||
| rblist.c | ||
| rblist.h | ||
| record.c | ||
| record.h | ||
| rlimit.c | ||
| rlimit.h | ||
| rwsem.c | ||
| rwsem.h | ||
| s390-cpumcf-kernel.h | ||
| s390-cpumsf-kernel.h | ||
| s390-cpumsf.c | ||
| s390-cpumsf.h | ||
| s390-sample-raw.c | ||
| sample-raw.c | ||
| sample-raw.h | ||
| session.c | ||
| session.h | ||
| setns.c | ||
| setup.py | ||
| sideband_evlist.c | ||
| smt.c | ||
| smt.h | ||
| sort.c | ||
| sort.h | ||
| spark.c | ||
| spark.h | ||
| srccode.c | ||
| srccode.h | ||
| srcline.c | ||
| srcline.h | ||
| stat-display.c | ||
| stat-shadow.c | ||
| stat.c | ||
| stat.h | ||
| strbuf.c | ||
| strbuf.h | ||
| stream.c | ||
| stream.h | ||
| strfilter.c | ||
| strfilter.h | ||
| string.c | ||
| string2.h | ||
| strlist.c | ||
| strlist.h | ||
| svghelper.c | ||
| svghelper.h | ||
| symbol_conf.h | ||
| symbol_fprintf.c | ||
| symbol-elf.c | ||
| symbol-minimal.c | ||
| symbol.c | ||
| symbol.h | ||
| symsrc.h | ||
| synthetic-events.c | ||
| synthetic-events.h | ||
| syscalltbl.c | ||
| syscalltbl.h | ||
| target.c | ||
| target.h | ||
| term.c | ||
| term.h | ||
| thread_map.c | ||
| thread_map.h | ||
| thread-stack.c | ||
| thread-stack.h | ||
| thread.c | ||
| thread.h | ||
| time-utils.c | ||
| time-utils.h | ||
| tool.h | ||
| top.c | ||
| top.h | ||
| topdown.c | ||
| topdown.h | ||
| trace-event-info.c | ||
| trace-event-parse.c | ||
| trace-event-read.c | ||
| trace-event-scripting.c | ||
| trace-event.c | ||
| trace-event.h | ||
| trigger.h | ||
| tsc.c | ||
| tsc.h | ||
| units.c | ||
| units.h | ||
| unwind-libdw.c | ||
| unwind-libdw.h | ||
| unwind-libunwind-local.c | ||
| unwind-libunwind.c | ||
| unwind.h | ||
| usage.c | ||
| util.c | ||
| util.h | ||
| values.c | ||
| values.h | ||
| vdso.c | ||
| vdso.h | ||
| zlib.c | ||
| zstd.c | ||