linux/tools/perf/Documentation
Namhyung Kim 9b4525fd08 perf tools: Merge deferred user callchains
Save samples with deferred callchains in a separate list and deliver
them after merging the user callchains.  If users don't want to merge
they can set tool->merge_deferred_callchains to false to prevent the
behavior.

With previous result, now perf script will show the merged callchains.

  $ perf script
  ...
  pwd    2312   121.163435:     249113 cpu/cycles/P:
          ffffffff845b78d8 __build_id_parse.isra.0+0x218 ([kernel.kallsyms])
          ffffffff83bb5bf6 perf_event_mmap+0x2e6 ([kernel.kallsyms])
          ffffffff83c31959 mprotect_fixup+0x1e9 ([kernel.kallsyms])
          ffffffff83c31dc5 do_mprotect_pkey+0x2b5 ([kernel.kallsyms])
          ffffffff83c3206f __x64_sys_mprotect+0x1f ([kernel.kallsyms])
          ffffffff845e6692 do_syscall_64+0x62 ([kernel.kallsyms])
          ffffffff8360012f entry_SYSCALL_64_after_hwframe+0x76 ([kernel.kallsyms])
              7f18fe337fa7 mprotect+0x7 (/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2)
              7f18fe330e0f _dl_sysdep_start+0x7f (/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2)
              7f18fe331448 _dl_start_user+0x0 (/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2)
  ...

The old output can be get using --no-merge-callchain option.
Also perf report can get the user callchain entry at the end.

  $ perf report --no-children --stdio -q -S __build_id_parse.isra.0
  # symbol: __build_id_parse.isra.0
       8.40%  pwd      [kernel.kallsyms]
              |
              ---__build_id_parse.isra.0
                 perf_event_mmap
                 mprotect_fixup
                 do_mprotect_pkey
                 __x64_sys_mprotect
                 do_syscall_64
                 entry_SYSCALL_64_after_hwframe
                 mprotect
                 _dl_sysdep_start
                 _dl_start_user

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-12-02 21:59:14 -08:00
..
android.txt perf docs: Document building with Clang 2025-10-06 16:49:25 -03:00
arm-coresight.txt perf docs: Fix man page build wrt perf-arm-coresight.txt 2022-10-25 17:40:48 -03:00
asciidoc.conf perf docs: Allow man page date to be specified 2019-09-27 09:26:14 -03:00
asciidoctor-extensions.rb
build-docdep.perl perf doc: Fix doc.dep 2021-08-02 09:56:17 -03:00
build-xed.txt
Build.txt perf docs: Document building with Clang 2025-10-06 16:49:25 -03:00
callchain-overhead-calculation.txt perf report: Add latency and parallelism profiling documentation 2025-02-18 14:04:32 -08:00
cat-texi.perl perf doc: Fix perfman.info build 2021-08-02 09:56:17 -03:00
cpu-and-latency-overheads.txt perf report: Add latency and parallelism profiling documentation 2025-02-18 14:04:32 -08:00
db-export.txt
examples.txt perf tools: Replace lkml.org links with lore 2021-02-11 12:54:27 -03:00
guest-files.txt perf tools: Tidy guest option documentation 2022-08-11 18:50:17 -03:00
guestmount.txt perf tools: Tidy guest option documentation 2022-08-11 18:50:17 -03:00
intel-acr.txt perf record: Add ratio-to-prev term 2025-10-03 16:49:51 -03:00
intel-bts.txt
intel-hybrid.txt perf tools: Fix up some comments and code to properly use the event_source bus 2025-02-19 13:23:43 -08:00
intel-pt.txt perf intel-pt: Update intel-pt.txt file with new location of the documentation 2020-03-11 11:00:33 -03:00
itrace.txt perf arm-spe: Update --itrace help text 2024-10-29 16:10:17 -07:00
jit-interface.txt
jitdump-specification.txt perf doc: Fix typos all over the place 2021-09-27 09:32:28 -03:00
Makefile perf doc: Add support for KBUILD_BUILD_TIMESTAMP 2023-05-15 17:49:01 -03:00
manpage-1.72.xsl
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-suppress-sp.xsl
perf-amd-ibs.txt perf mem: Document new output fields (op, cache, mem, dtlb, snoop) 2025-06-16 14:05:10 -03:00
perf-annotate.txt perf annotate: Add --code-with-type support for TUI 2025-08-28 12:33:08 -03:00
perf-archive.txt
perf-arm-spe.txt perf docs: arm-spe: Document new SPE filtering features 2025-11-24 12:20:07 -08:00
perf-bench.txt perf bench mem: Add mmap() workloads 2025-09-19 12:43:59 -03:00
perf-buildid-cache.txt perf record: Disable debuginfod by default 2022-01-15 17:41:25 -03:00
perf-buildid-list.txt perf buildid-list: Add a "-m" option to show kernel and modules build-ids 2022-07-18 16:35:34 -03:00
perf-c2c.txt perf c2c: Add annotation support to perf c2c report 2025-10-19 12:49:59 +09:00
perf-check.txt perf build: Remove NO_AUXTRACE build option 2025-11-13 23:03:11 -08:00
perf-config.txt perf record: Add --call-graph fp,defer option for deferred callchains 2025-12-02 21:59:13 -08:00
perf-daemon.txt perf daemon: Add examples to man page 2021-02-11 10:19:52 -03:00
perf-data.txt perf data: Add JSON export 2021-04-29 10:30:58 -03:00
perf-diff.txt perf tools: Fix duplicated words in documentation and comments 2025-10-01 09:44:02 -03:00
perf-dlfilter.txt perf dlfilter: Add al_cleanup() 2023-08-15 16:41:49 -03:00
perf-evlist.txt perf tools: Fix documentation of verbose options 2021-03-06 16:54:26 -03:00
perf-ftrace.txt perf: ftrace: add graph tracer options args/retval/retval-hex/retaddr 2025-07-22 17:47:22 -07:00
perf-help.txt
perf-inject.txt perf inject: Clarify build-id options a little bit 2022-10-04 08:55:22 -03:00
perf-intel-pt.txt perf intel-pt: Add documentation for pause / resume 2024-12-18 16:24:32 -03:00
perf-iostat.txt perf docs: Fix accidental em-dashes 2021-08-10 11:05:21 -03:00
perf-kallsyms.txt perf tools: Fix documentation of verbose options 2021-03-06 16:54:26 -03:00
perf-kmem.txt perf kmem: Improve man page for record options 2021-10-08 16:10:02 -03:00
perf-kvm.txt perf docs: Refine the description for the buffer size 2024-08-12 13:59:22 -03:00
perf-kwork.txt perf docs: Fix typos 2024-05-28 22:52:28 -07:00
perf-list.txt perf record: Add ratio-to-prev term 2025-10-03 16:49:51 -03:00
perf-lock.txt perf lock contention: Reject more than 10ms delays for safety 2025-05-31 08:45:24 -03:00
perf-mem.txt perf mem: Document new output fields (op, cache, mem, dtlb, snoop) 2025-06-16 14:05:10 -03:00
perf-probe.txt perf docs: Fix a typo in 'perf probe' man page: l20th -> 120th 2023-01-19 09:49:59 -03:00
perf-record.txt perf record: Add --call-graph fp,defer option for deferred callchains 2025-12-02 21:59:13 -08:00
perf-report.txt perf report: Add 'tgid' sort key 2025-05-13 17:51:32 -03:00
perf-sched.txt perf sched timehist: Add pre-migration wait time option 2024-10-14 12:04:31 -07:00
perf-script-perl.txt perf tools docs: Use canonical ftrace path 2023-02-02 16:32:19 -03:00
perf-script-python.txt perf scripting python: Add function to get a config value 2024-09-24 11:47:03 -07:00
perf-script.txt perf tools: Merge deferred user callchains 2025-12-02 21:59:14 -08:00
perf-stat.txt perf stat: Fix uncore aggregation number 2025-06-27 16:14:10 -07:00
perf-test.txt perf test: Improve verbose documentation 2025-01-16 11:01:03 -08:00
perf-timechart.txt
perf-top.txt perf docs: Refine the description for the buffer size 2024-08-12 13:59:22 -03:00
perf-trace.txt perf trace: Add --max-summary option 2025-09-19 12:14:29 -03:00
perf-version.txt
perf.data-directory-format.txt perf record: Put a copy of kcore into the perf.data directory 2019-11-06 15:43:05 -03:00
perf.data-file-format.txt perf tools: Update header documentation on BPF_PROG_INFO 2025-09-19 12:14:30 -03:00
perf.txt perf doc: Add AMD IBS usage document 2024-06-20 16:51:55 -07:00
perfconfig.example
security.txt perf docs: Introduce security.txt file to document related issues 2020-05-28 10:03:26 -03:00
tips.txt perf report: Add latency and parallelism profiling documentation 2025-02-18 14:04:32 -08:00
topdown.txt perf Document: Add TPEBS (Timed PEBS(Precise Event-Based Sampling)) to Documents 2024-08-13 15:25:33 -03:00