aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArun Sharma <aruns@google.com>2010-06-04 10:27:10 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-06-05 08:35:53 -0400
commitf60f359383edf2a0ec3aa32cf8be98ad815bdf65 (patch)
treea2e544f8a1c80f2fa34018903bef1e61d71b768a /tools/perf/builtin-record.c
parent41a37e20178b081193b08b228030d8f562bfee62 (diff)
perf report: Implement --sort cpu
In a shared multi-core environment, users want to analyze why their program was slow. In particular, if the code ran slower only on certain CPUs due to interference from other programs or kernel threads, the user should be able to notice that. Sample usage: perf record -f -a -- sleep 3 perf report --sort cpu,comm Workload: program is running on 16 CPUs Experiencing interference from an antagonist only on 4 CPUs. Samples: 106218177676 cycles Overhead CPU Command ........ ... ............... 6.25% 2 program 6.24% 6 program 6.24% 11 program 6.24% 5 program 6.24% 9 program 6.24% 10 program 6.23% 15 program 6.23% 7 program 6.23% 3 program 6.23% 14 program 6.22% 1 program 6.20% 13 program 3.17% 12 program 3.15% 8 program 3.14% 0 program 3.13% 4 program 3.11% 4 antagonist 3.11% 0 antagonist 3.10% 8 antagonist 3.07% 12 antagonist Cc: David S. Miller <davem@davemloft.net> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <20100505181612.GA5091@sharma-home.net> Signed-off-by: Arun Sharma <aruns@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index f28c4bbd801f..5e5c6403a315 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -274,6 +274,9 @@ static void create_counter(int counter, int cpu)
274 if (call_graph) 274 if (call_graph)
275 attr->sample_type |= PERF_SAMPLE_CALLCHAIN; 275 attr->sample_type |= PERF_SAMPLE_CALLCHAIN;
276 276
277 if (system_wide)
278 attr->sample_type |= PERF_SAMPLE_CPU;
279
277 if (raw_samples) { 280 if (raw_samples) {
278 attr->sample_type |= PERF_SAMPLE_TIME; 281 attr->sample_type |= PERF_SAMPLE_TIME;
279 attr->sample_type |= PERF_SAMPLE_RAW; 282 attr->sample_type |= PERF_SAMPLE_RAW;