projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9956346
)
perf tools: Set event->header.misc to PERF_RECORD_MISC_GUEST_USER if machine is guest.
author
Dongsheng Yang
<
[email protected]
>
Fri, 20 Dec 2013 20:52:58 +0000
(15:52 -0500)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Mon, 23 Dec 2013 19:49:50 +0000
(16:49 -0300)
When we synthesize the mmap events of user space, if machine is guest,
we should set the event->header.misc to PERF_RECORD_MISC_GUEST_USER,
rather than PERF_RECORD_MISC_USER.
Signed-off-by: Dongsheng Yang <
[email protected]
>
Cc: David Ahern <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Jiri Olsa <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Link:
http://lkml.kernel.org/r/e6f8ff6505d2db8a4b21bff8e448bb9be0bcff35.1387572416.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/util/event.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/event.c
b/tools/perf/util/event.c
index a61726ea01a9ccbda21cacaa0c009954e70205f4..07c07833de53a2b6063880af4314038f3b5d57b7 100644
(file)
--- a/
tools/perf/util/event.c
+++ b/
tools/perf/util/event.c
@@
-220,7
+220,10
@@
static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
/*
* Just like the kernel, see __perf_event_mmap in kernel/perf_event.c
*/
- event->header.misc = PERF_RECORD_MISC_USER;
+ if (machine__is_host(machine))
+ event->header.misc = PERF_RECORD_MISC_USER;
+ else
+ event->header.misc = PERF_RECORD_MISC_GUEST_USER;
if (prot[2] != 'x') {
if (!mmap_data || prot[0] != 'r')