perf: 'perf kvm' tool for monitoring guest performance from host
Here is the patch of userspace perf tool.
Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 5bf8ab0..3967f8f 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -78,6 +78,7 @@
/* Initialize symbol maps and path of vmlinux */
static int init_vmlinux(void)
{
+ struct dso *kernel;
int ret;
symbol_conf.sort_by_name = true;
@@ -91,8 +92,12 @@
goto out;
}
+ kernel = dso__new_kernel(symbol_conf.vmlinux_name);
+ if (kernel == NULL)
+ die("Failed to create kernel dso.");
+
map_groups__init(&kmap_groups);
- ret = map_groups__create_kernel_maps(&kmap_groups, kmaps);
+ ret = __map_groups__create_kernel_maps(&kmap_groups, kmaps, kernel);
if (ret < 0)
pr_debug("Failed to create kernel maps.\n");