Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299236
b: refs/heads/master
c: 7fb0a5e
h: refs/heads/master
v: v3
  • Loading branch information
Nikunj A. Dadhania authored and Arnaldo Carvalho de Melo committed Apr 11, 2012
1 parent 33a1e78 commit b681aea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31d68e7b66f168e623902e194af1e52b8cf75d71
refs/heads/master: 7fb0a5ee8889488f7568ffddffeb66ddeb50917e
12 changes: 10 additions & 2 deletions trunk/tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,16 @@ static struct machine *
{
const u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;

if (cpumode == PERF_RECORD_MISC_GUEST_KERNEL && perf_guest)
return perf_session__find_machine(session, event->ip.pid);
if (cpumode == PERF_RECORD_MISC_GUEST_KERNEL && perf_guest) {
u32 pid;

if (event->header.type == PERF_RECORD_MMAP)
pid = event->mmap.pid;
else
pid = event->ip.pid;

return perf_session__find_machine(session, pid);
}

return perf_session__find_host_machine(session);
}
Expand Down

0 comments on commit b681aea

Please sign in to comment.