Commit 24bfef0f authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar

perf top: Fix sample counting

Broken since "5b2bb75a perf top: Support userspace symbols too".
Reported-by: default avatarMike Galbraith <efault@gmx.de>
Tested-by: default avatarMike Galbraith <efault@gmx.de>
Signed-off-by: default avatarArnaldo 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: default avatarIngo Molnar <mingo@elte.hu>
parent abd50713
...@@ -934,8 +934,11 @@ static void event__process_sample(const event_t *self, ...@@ -934,8 +934,11 @@ static void event__process_sample(const event_t *self,
struct addr_location al; struct addr_location al;
u8 origin = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; u8 origin = self->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
++samples;
switch (origin) { switch (origin) {
case PERF_RECORD_MISC_USER: case PERF_RECORD_MISC_USER:
++userspace_samples;
if (hide_user_symbols) if (hide_user_symbols)
return; return;
break; break;
...@@ -960,9 +963,6 @@ static void event__process_sample(const event_t *self, ...@@ -960,9 +963,6 @@ static void event__process_sample(const event_t *self,
if (list_empty(&syme->node) || !syme->node.next) if (list_empty(&syme->node) || !syme->node.next)
__list_insert_active_sym(syme); __list_insert_active_sym(syme);
pthread_mutex_unlock(&active_symbols_lock); pthread_mutex_unlock(&active_symbols_lock);
if (origin == PERF_RECORD_MISC_USER)
++userspace_samples;
++samples;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment