diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 3162bad0d17d..5d448c36ed22 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1276,8 +1276,7 @@ static int __cmd_top(struct perf_top *top) top->evlist->core.threads, true, false, top->nr_threads_synthesize); - if (top->nr_threads_synthesize > 1) - perf_set_singlethreaded(); + perf_set_multithreaded(); if (perf_hpp_list.socket) { ret = perf_env__read_cpu_topology_map(&perf_env); @@ -1355,6 +1354,7 @@ static int __cmd_top(struct perf_top *top) out_join_thread: cond_signal(&top->qe.cond); pthread_join(thread_process, NULL); + perf_set_singlethreaded(); return ret; }