aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-09-30 10:45:26 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-10-01 09:54:33 -0300
commitc53d138d41a7f33cf085762c64b4b61e8d223e1c (patch)
treeb7bf1dfc21e2f79bd375e19c226daa9a0dcb6fb8 /tools/perf/builtin-top.c
parentperf top: Fix unresolved comm when -s comm is used (diff)
downloadlinux-dev-c53d138d41a7f33cf085762c64b4b61e8d223e1c.tar.xz
linux-dev-c53d138d41a7f33cf085762c64b4b61e8d223e1c.zip
perf top: Register idle thread
The perf top didn't add the idle/swapper thread to the machine's thread list and its comm was displayed as ':0'. Fix it. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1443577526-3240-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index ae4c6420300b..6f641fd68296 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -964,6 +964,9 @@ static int __cmd_top(struct perf_top *top)
if (ret)
goto out_delete;
+ if (perf_session__register_idle_thread(top->session) == NULL)
+ goto out_delete;
+
machine__synthesize_threads(&top->session->machines.host, &opts->target,
top->evlist->threads, false, opts->proc_map_timeout);