aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongsheng Yang <yangds.fnst@cn.fujitsu.com>2013-12-20 15:53:00 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-23 14:49:51 -0500
commitc239c25a82808ad2cbc795b69e621c4c24f154d6 (patch)
tree11ed53250b4467fd2aa8d72317144e76437ff439
parentf5db57c4c47f3985dfc677152e25636a3401fa13 (diff)
perf tools: Do not synthesize the treads of default guest.
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>
-rw-r--r--tools/perf/util/event.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 2905771a1f49..45a76c69a9ed 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -133,6 +133,9 @@ static pid_t perf_event__synthesize_comm(struct perf_tool *tool,
133 goto out; 133 goto out;
134 } 134 }
135 135
136 if (machine__is_default_guest(machine))
137 return 0;
138
136 snprintf(filename, sizeof(filename), "%s/proc/%d/task", 139 snprintf(filename, sizeof(filename), "%s/proc/%d/task",
137 machine->root_dir, pid); 140 machine->root_dir, pid);
138 141
@@ -183,6 +186,9 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
183 FILE *fp; 186 FILE *fp;
184 int rc = 0; 187 int rc = 0;
185 188
189 if (machine__is_default_guest(machine))
190 return 0;
191
186 snprintf(filename, sizeof(filename), "%s/proc/%d/maps", 192 snprintf(filename, sizeof(filename), "%s/proc/%d/maps",
187 machine->root_dir, pid); 193 machine->root_dir, pid);
188 194
@@ -409,6 +415,9 @@ int perf_event__synthesize_threads(struct perf_tool *tool,
409 if (mmap_event == NULL) 415 if (mmap_event == NULL)
410 goto out_free_comm; 416 goto out_free_comm;
411 417
418 if (machine__is_default_guest(machine))
419 return 0;
420
412 snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir); 421 snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir);
413 proc = opendir(proc_path); 422 proc = opendir(proc_path);
414 423