diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-01-21 10:04:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-01-27 06:46:48 -0500 |
commit | 24bfef0f924b4ac4312614422a4982b5f4d9a4c7 (patch) | |
tree | 1a92f748c8bee85fc300faf778945e70c3332a89 /tools/perf/builtin-top.c | |
parent | abd50713944c8ea9e0af5b7bffa0aacae21cc91a (diff) |
perf top: Fix sample counting
Broken since "5b2bb75 perf top: Support userspace symbols too".
Reported-by: Mike Galbraith <efault@gmx.de>
Tested-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1264086284-1431-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 7a8a77ec2c9d..8b049888a9dd 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -934,8 +934,11 @@ static void event__process_sample(const event_t *self, | |||
934 | struct addr_location al; | 934 | struct addr_location al; |
935 | u8 origin = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; | 935 | u8 origin = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; |
936 | 936 | ||
937 | ++samples; | ||
938 | |||
937 | switch (origin) { | 939 | switch (origin) { |
938 | case PERF_RECORD_MISC_USER: | 940 | case PERF_RECORD_MISC_USER: |
941 | ++userspace_samples; | ||
939 | if (hide_user_symbols) | 942 | if (hide_user_symbols) |
940 | return; | 943 | return; |
941 | break; | 944 | break; |
@@ -960,9 +963,6 @@ static void event__process_sample(const event_t *self, | |||
960 | if (list_empty(&syme->node) || !syme->node.next) | 963 | if (list_empty(&syme->node) || !syme->node.next) |
961 | __list_insert_active_sym(syme); | 964 | __list_insert_active_sym(syme); |
962 | pthread_mutex_unlock(&active_symbols_lock); | 965 | pthread_mutex_unlock(&active_symbols_lock); |
963 | if (origin == PERF_RECORD_MISC_USER) | ||
964 | ++userspace_samples; | ||
965 | ++samples; | ||
966 | } | 966 | } |
967 | } | 967 | } |
968 | 968 | ||