perf: Don't assume host's module path for default guest machine
PATCH 1/1 perf: Don't assume host's module path for default guest machine
When using the default guest modules option (--guestmodules) for perf-kvm the host's module path is prepended to the modules. e.g,
... PERF_RECORD_MMAP 0/0: [0xffffffffa0005000(0x4fff) @ 0]:
/lib/modules/3.4.0+/kernel/drivers/virtio/virtio.ko
which is wrong so don't do it. With this patch MMAP events for default guest kernel modules become:
... PERF_RECORD_MMAP 0/0: [0xffffffffa0005000(0x4fff) @ 0]: [virtio]
Signed-off-by David Ahern <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Peter Zijlstra <[email protected]>
--- tools/perf/util/symbol.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/util/symbol.c +3 -0
@@ -2077,6 +2077,9 @@ static int machine__create_modules(struct machine *machine)free (line);fclose (file); +if (machine->pid ==DEFAULT_GUEST_KERNEL_ID ) +return 0 ; +return machine__set_modules_path (machine); out_delete_line:
Signature · 1 line
1.7.10.1