aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation/perf-report.txt
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2020-01-07 13:04:44 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-01-14 12:02:19 -0300
commit3b0b16bf8cb92ae67968c1abb7b335032b899b33 (patch)
tree6c724fc2c5ffce436e1c86ba9bc1a801c66d9e9d /tools/perf/Documentation/perf-report.txt
parentperf report: Clarify in help that --children is default (diff)
downloadlinux-dev-3b0b16bf8cb92ae67968c1abb7b335032b899b33.tar.xz
linux-dev-3b0b16bf8cb92ae67968c1abb7b335032b899b33.zip
perf tools: Support --prefix/--prefix-strip
The objdump utility has useful --prefix / --prefix-strip options to allow changing source code file names hardcoded into executables' debug info. Add options to 'perf report', 'perf top' and 'perf annotate', which are then passed to objdump. $ mkdir foo $ echo 'main() { for (;;); }' > foo/foo.c $ gcc -g foo/foo.c foo/foo.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | main() { for (;;); } | ^~~~ $ perf record ./a.out ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.230 MB perf.data (5721 samples) ] $ mv foo bar $ perf annotate <does not show source code> $ perf annotate --prefix=/home/ak/lsrc/git/bar --prefix-strip=5 <does show source code> Signed-off-by: Andi Kleen <ak@linux.intel.com> Tested-by: Jiri Olsa <jolsa@redhat.com> LPU-Reference: 20200107210444.214071-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Documentation/perf-report.txt')
-rw-r--r--tools/perf/Documentation/perf-report.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 8dbe2119686a..db61f16ffa56 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -367,6 +367,12 @@ OPTIONS
--objdump=<path>::
Path to objdump binary.
+--prefix=PREFIX::
+--prefix-strip=N::
+ Remove first N entries from source file path names in executables
+ and add PREFIX. This allows to display source code compiled on systems
+ with different file system layout.
+
--group::
Show event group information together. It forces group output also
if there are no groups defined in data file.