diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-04-25 08:59:16 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-04-25 08:59:16 +0200 |
commit | 3dbe927b1eddcbd66da1653168e33122aca84f4e (patch) | |
tree | 2357f4c55156597b1d07b9ea360b07086cd011e4 /tools/perf/util/session.c | |
parent | a385ec4f11bdcf81af094c03e2444ee9b7fad2e5 (diff) | |
parent | 66f75a5d028beaf67c931435fdc3e7823125730c (diff) |
Merge tag 'v3.4-rc4' into perf/core
Merge v3.4-rc4 - we were on -rc2 before.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 9412e3b05f6..1efd3bee633 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -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); } @@ -868,11 +876,11 @@ static int perf_session_deliver_event(struct perf_session *session, dump_sample(session, event, sample); if (evsel == NULL) { ++session->hists.stats.nr_unknown_id; - return -1; + return 0; } if (machine == NULL) { ++session->hists.stats.nr_unprocessable_samples; - return -1; + return 0; } return tool->sample(tool, event, sample, evsel, machine); case PERF_RECORD_MMAP: |