diff options
author | Anton Blanchard <anton@samba.org> | 2011-07-04 07:57:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-07-05 04:44:44 -0400 |
commit | 5d67be97f8903d05ce53597fb5f3bc25a45e8026 (patch) | |
tree | 5ce8c2407d50570d7fee79b9c7f24e8eb89384b4 /tools/perf/Documentation/perf-script.txt | |
parent | 9f8b6a6cf0ee78de87ebe1e87f54bec1c1741ef7 (diff) |
perf report/annotate/script: Add option to specify a CPU range
Add an option to perf report/annotate/script to specify which
CPUs to operate on. This enables us to take a single system wide
profile and analyse each CPU (or group of CPUs) in isolation.
This was useful when profiling a multiprocess workload where the
bottleneck was on one CPU but this was hidden in the overall
profile. Per process and per thread breakdowns didn't help
because multiple processes were running on each CPU and no
single process consumed an entire CPU.
The patch converts the list of CPUs returned by cpu_map__new
into a bitmap for fast lookup. I wanted to use -C to be
consistent with perf top/record/stat, but unfortunately perf
report already uses -C <comms>.
v2: Incorporate suggestions from David Ahern:
- Added -c to perf script
- Check that SAMPLE_CPU is set when -c is used
- Update documentation
v3: Create perf_session__cpu_bitmap()
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Link: http://lkml.kernel.org/r/20110704215750.11647eb9@kryten
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Documentation/perf-script.txt')
-rw-r--r-- | tools/perf/Documentation/perf-script.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt index c6068cb43f57..db017867d9e8 100644 --- a/tools/perf/Documentation/perf-script.txt +++ b/tools/perf/Documentation/perf-script.txt | |||
@@ -182,6 +182,12 @@ OPTIONS | |||
182 | --hide-call-graph:: | 182 | --hide-call-graph:: |
183 | When printing symbols do not display call chain. | 183 | When printing symbols do not display call chain. |
184 | 184 | ||
185 | -c:: | ||
186 | --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can | ||
187 | be provided as a comma-separated list with no space: 0,1. Ranges of | ||
188 | CPUs are specified with -: 0-2. Default is to report samples on all | ||
189 | CPUs. | ||
190 | |||
185 | SEE ALSO | 191 | SEE ALSO |
186 | -------- | 192 | -------- |
187 | linkperf:perf-record[1], linkperf:perf-script-perl[1], | 193 | linkperf:perf-record[1], linkperf:perf-script-perl[1], |