summaryrefslogtreecommitdiff
path: root/tools/perf/util/event.c
diff options
context:
space:
mode:
authorArun Sharma <aruns@google.com>2010-06-04 18:27:10 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-06-05 16:35:53 +0400
commitf60f359383edf2a0ec3aa32cf8be98ad815bdf65 (patch)
treea2e544f8a1c80f2fa34018903bef1e61d71b768a /tools/perf/util/event.c
parent41a37e20178b081193b08b228030d8f562bfee62 (diff)
downloadlinux-f60f359383edf2a0ec3aa32cf8be98ad815bdf65.tar.xz
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/util/event.c')
-rw-r--r--tools/perf/util/event.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index ed3e14ff6df0..a7460868124b 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -710,6 +710,7 @@ int event__preprocess_sample(const event_t *self, struct perf_session *session,
al->map ? al->map->dso->long_name :
al->level == 'H' ? "[hypervisor]" : "<not found>");
al->sym = NULL;
+ al->cpu = data->cpu;
if (al->map) {
if (symbol_conf.dso_list &&