Skip to content

Commit

Permalink
perf report: Fix reporting of hypervisor
Browse files Browse the repository at this point in the history
PERF_EVENT_MISC_* is not a bitmask, so we have to mask and compare.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230141.088394681@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Anton Blanchard authored and Ingo Molnar committed Jun 30, 2009
1 parent 3a3393e commit d8db1b5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
struct map *map = NULL;
void *more_data = event->ip.__more_data;
struct ip_callchain *chain = NULL;
int cpumode;

if (sample_type & PERF_SAMPLE_PERIOD) {
period = *(u64 *)more_data;
Expand Down Expand Up @@ -1256,15 +1257,17 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
if (comm_list && !strlist__has_entry(comm_list, thread->comm))
return 0;

if (event->header.misc & PERF_EVENT_MISC_KERNEL) {
cpumode = event->header.misc & PERF_EVENT_MISC_CPUMODE_MASK;

if (cpumode == PERF_EVENT_MISC_KERNEL) {
show = SHOW_KERNEL;
level = 'k';

dso = kernel_dso;

dprintf(" ...... dso: %s\n", dso->name);

} else if (event->header.misc & PERF_EVENT_MISC_USER) {
} else if (cpumode == PERF_EVENT_MISC_USER) {

show = SHOW_USER;
level = '.';
Expand Down

0 comments on commit d8db1b5

Please sign in to comment.