From c53d138d41a7f33cf085762c64b4b61e8d223e1c Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Wed, 30 Sep 2015 10:45:26 +0900 Subject: 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 Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1443577526-3240-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-top.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/perf/builtin-top.c') 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); -- cgit v1.2.1