linux/tools/perf
Waiman Long 91e9561742 perf report: Add --max-stack option to limit callchain stack scan
When callgraph data was included in the perf data file, it may take a
long time to scan all those data and merge them together especially if
the stored callchains are long and the perf data file itself is large,
like a Gbyte or so.

The callchain stack is currently limited to PERF_MAX_STACK_DEPTH (127).
This is a large value. Usually the callgraph data that developers are
most interested in are the first few levels, the rests are usually not
looked at.

This patch adds a new --max-stack option to perf-report to limit the
depth of callchain stack data to look at to reduce the time it takes for
perf-report to finish its processing. It trades the presence of trailing
stack information with faster speed.

The following table shows the elapsed time of doing perf-report on a
perf.data file of size 985,531,828 bytes.

  --max_stack   Elapsed Time    Output data size
  -----------   ------------    ----------------
  not set        88.0s          124,422,651
  64             87.5s          116,303,213
  32             87.2s          112,023,804
  16             86.6s           94,326,380
  8              59.9s           33,697,248
  4              40.7s           10,116,637
  -g none        27.1s            2,555,810

Signed-off-by: Waiman Long <Waiman.Long@hp.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Scott J Norton <scott.norton@hp.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1382107129-2010-4-git-send-email-Waiman.Long@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-10-21 17:36:25 -03:00
..
arch tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT 2013-10-09 08:48:28 +02:00
bench perf tools: Fix bench/numa.c for 32-bit build 2013-10-21 11:19:42 -03:00
config perf tools: Fix test_on_exit for 32-bit build 2013-10-21 11:19:42 -03:00
Documentation perf report: Add --max-stack option to limit callchain stack scan 2013-10-21 17:36:25 -03:00
python perf python: Remove duplicate TID bit from mask 2013-08-07 17:35:25 -03:00
scripts perf script: Fix broken include in Context.xs 2013-07-10 13:47:00 -03:00
tests perf tests: Fix memory leak in dso-data.c 2013-10-14 10:28:54 -03:00
ui perf annotate: Another fix for annotate_browser__callq() 2013-10-14 12:21:18 -03:00
util perf report: Add --max-stack option to limit callchain stack scan 2013-10-21 17:36:25 -03:00
.gitignore perf tools: Ignore 'perf timechart' output file 2013-10-11 12:17:37 -03:00
bash_completion perf completion: Use more comp words 2013-10-09 11:12:31 -03:00
builtin-annotate.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-bench.c tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT 2013-10-09 08:48:28 +02:00
builtin-buildid-cache.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-buildid-list.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-diff.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-evlist.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-help.c perf help: Fix --help for builtins 2012-10-22 12:35:49 -02:00
builtin-inject.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-kmem.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-kvm.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-list.c perf list: List kernel supplied event aliases 2013-07-12 13:53:53 -03:00
builtin-lock.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-mem.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-probe.c tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT 2013-10-09 08:48:28 +02:00
builtin-record.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-report.c perf report: Add --max-stack option to limit callchain stack scan 2013-10-21 17:36:25 -03:00
builtin-sched.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-script.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-stat.c perf stat: Add units to nanosec-based counters 2013-10-11 12:17:46 -03:00
builtin-timechart.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-top.c perf report: Add --max-stack option to limit callchain stack scan 2013-10-21 17:36:25 -03:00
builtin-trace.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin.h perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
command-list.txt perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
Makefile tools/perf/build: Pass through DEBUG parameter 2013-10-14 10:29:07 -03:00
Makefile.perf perf tools: Add perf_data_file__open interface to data object 2013-10-21 17:33:24 -03:00
MANIFEST perf tools: Introduce tools/lib/lk library 2013-03-15 13:06:00 -03:00
perf-archive.sh perf archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf.c perf trace: Add 'trace' alias to 'perf trace' 2013-10-11 12:17:10 -03:00
perf.h perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00