perf tools: Do not synthesize the treads of default guest.
authorDongsheng Yang <yangds.fnst@cn.fujitsu.com>
Fri, 20 Dec 2013 20:53:00 +0000 (15:53 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 23 Dec 2013 19:49:51 +0000 (16:49 -0300)
As the default guest is designed to handle orphan kernel symboles with
--guestkallsysms and --guestmodules, it has no user space.

So we should skip synthesizing threads if machine is default guest.

Signed-off-by: Dongsheng 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/e9ddb5dac6f963169657218b12ceb3c2030f54e8.1387572416.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c

index 2905771a1f494ac7c65aa605c6fd2b62a60025ca..45a76c69a9eda8a1f54d65d7e314b36ecf512f76 100644 (file)
@@ -133,6 +133,9 @@ static pid_t perf_event__synthesize_comm(struct perf_tool *tool,
                goto out;
        }
 
+       if (machine__is_default_guest(machine))
+               return 0;
+
        snprintf(filename, sizeof(filename), "%s/proc/%d/task",
                 machine->root_dir, pid);
 
@@ -183,6 +186,9 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
        FILE *fp;
        int rc = 0;
 
+       if (machine__is_default_guest(machine))
+               return 0;
+
        snprintf(filename, sizeof(filename), "%s/proc/%d/maps",
                 machine->root_dir, pid);
 
@@ -409,6 +415,9 @@ int perf_event__synthesize_threads(struct perf_tool *tool,
        if (mmap_event == NULL)
                goto out_free_comm;
 
+       if (machine__is_default_guest(machine))
+               return 0;
+
        snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir);
        proc = opendir(proc_path);
 
This page took 0.027189 seconds and 5 git commands to generate.