aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index cc96d753db96..c3a936ef7688 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -950,14 +950,9 @@ static int __cmd_top(struct perf_top *top)
if (ret)
goto out_delete;
- if (perf_target__has_task(&opts->target))
- perf_event__synthesize_thread_map(&top->tool, top->evlist->threads,
- perf_event__process,
- &top->session->machines.host, false);
- else
- perf_event__synthesize_threads(&top->tool, perf_event__process,
- &top->session->machines.host, false);
-
+ machine__synthesize_threads(&top->session->machines.host, &top->tool,
+ &opts->target, top->evlist->threads,
+ perf_event__process, false);
ret = perf_top__start_counters(top);
if (ret)
goto out_delete;