aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2010-05-28 12:08:01 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-06-05 09:32:24 -0300
commit761844b9c68b3c67b085265f92ac0675706cc3b3 (patch)
tree03b3466f0e098c6c5dfa7c6712d67f3a5528264d /tools/perf/util
parentMerge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent (diff)
downloadlinux-dev-761844b9c68b3c67b085265f92ac0675706cc3b3.tar.xz
linux-dev-761844b9c68b3c67b085265f92ac0675706cc3b3.zip
perf report: Make -D print sampled CPU
It is useful to know on which CPU a sample was captured on. The information is captured with perf record -R but it was not printed out by perf report -D. This patch adds this. When -R is not used, cpu is set to -1to indicate that the CPU is unknown (it is not captured). 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: <4bff964c.e88cd80a.3106.7d31@mx.google.com> Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 1f08f008d289..891753255f54 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -765,7 +765,8 @@ int event__parse_sample(event_t *event, u64 type, struct sample_data *data)
u32 *p = (u32 *)array;
data->cpu = *p;
array++;
- }
+ } else
+ data->cpu = -1;
if (type & PERF_SAMPLE_PERIOD) {
data->period = *array;