提交 73547aac 编写于 作者: D Dongsheng Yang 提交者: Arnaldo Carvalho de Melo

perf tools: Set event->header.misc to PERF_RECORD_MISC_GUEST_USER if machine is guest.

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: NDongsheng Yang <yangds.fnst@cn.fujitsu.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Link: http://lkml.kernel.org/r/e6f8ff6505d2db8a4b21bff8e448bb9be0bcff35.1387572416.git.yangds.fnst@cn.fujitsu.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 99563465
...@@ -220,7 +220,10 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool, ...@@ -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 * Just like the kernel, see __perf_event_mmap in kernel/perf_event.c
*/ */
if (machine__is_host(machine))
event->header.misc = PERF_RECORD_MISC_USER; event->header.misc = PERF_RECORD_MISC_USER;
else
event->header.misc = PERF_RECORD_MISC_GUEST_USER;
if (prot[2] != 'x') { if (prot[2] != 'x') {
if (!mmap_data || prot[0] != 'r') if (!mmap_data || prot[0] != 'r')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册