diff options
| author | Takashi Iwai <tiwai@suse.de> | 2012-05-21 12:45:18 +0200 | 
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-05-21 12:45:18 +0200 | 
| commit | 775b2449bdba7c97dda9f274c92bf7a83dac4142 (patch) | |
| tree | b4bee45c13762ea93642b1e38c62de454e51cf5d /tools/perf/util/session.c | |
| parent | 21363cf0ca5c9c62e34e37422fb1d13d70d3de3c (diff) | |
| parent | 5fb86e5d4a951ddb0474cdfd809380c8e2a8d101 (diff) | |
| download | olio-linux-3.10-775b2449bdba7c97dda9f274c92bf7a83dac4142.tar.xz olio-linux-3.10-775b2449bdba7c97dda9f274c92bf7a83dac4142.zip  | |
Merge branch 'topic/asoc' into for-linus
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:  |