diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-05-09 18:32:01 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-05-09 18:32:01 -0600 |
commit | 3aa450c063e29b4f4b622480e1779e5e256d8f8f (patch) | |
tree | d18942ff8bf862f2973f4e7adbf99c4f3e22a563 /tools/perf/util/session.c | |
parent | d57a4282d04810417c4ed2a49cbbeda8b3569b18 (diff) | |
parent | d48b97b403d23f6df0b990cee652bdf9a52337a3 (diff) |
Merge tag 'v3.4-rc6' into spi/next
Linux 3.4-rc6
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 9412e3b05f68..1efd3bee6336 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: |