diff options
| author | Andi Kleen <[email protected]> | 2015-08-07 22:24:05 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-08-10 14:58:05 +0000 |
| commit | a9710ba091b0dcdace90f791706e9192313ffb7c (patch) | |
| tree | 8d6e07ac2f6632de86779732095df9b61cc3a575 /tools/perf/builtin-script.c | |
| parent | perf callchain: Move option parsing code to util.c (diff) | |
| download | kernel-a9710ba091b0dcdace90f791706e9192313ffb7c.tar.gz kernel-a9710ba091b0dcdace90f791706e9192313ffb7c.zip | |
perf tools: Support full source file paths for srcline
For perf report/script srcline currently only the base file name of the
source file is printed. This is a good default because it usually fits
on the screen.
But in some cases we want to know the full file name, for example to
aggregate hits per file.
In the later case we need more than the base file name to resolve file
naming collisions: for example the kernel source has ~70 files named
"core.c"
It's also useful as input to post processing tools which want to point
to the right file.
Add a flag to allow full file name output.
Add an option to perf report/script to enable this option.
Signed-off-by: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 7912feb9a024..7b376d215e94 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1653,6 +1653,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts", "Instruction Tracing options", itrace_parse_synth_opts), + OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename, + "Show full source file name path for source lines"), OPT_END() }; const char * const script_subcommands[] = { "record", "report", NULL }; |
