mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf: Don't assume host's module path for default guest machine
@ 2012-07-01 23:55 David Ahern
  0 siblings, 0 replies; only message in thread
From: David Ahern @ 2012-07-01 23:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Ahern, Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Frederic Weisbecker, Peter Zijlstra

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 <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 tools/perf/util/symbol.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 50958bb..90f6951 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -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:
-- 
1.7.10.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-01 23:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-01 23:55 [PATCH] perf: Don't assume host's module path for default guest machine David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome