diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-11 11:28:02 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-11 15:56:39 -0300 |
commit | 58d925dcede9e8765876707a33a3406011fe1c11 (patch) | |
tree | f2fe20989a9d7be863f746d970e999d3f1ec3458 /tools/perf/builtin-top.c | |
parent | 62605dc50c27bf0e4ff69b7b3166f226586aff02 (diff) | |
download | op-kernel-dev-58d925dcede9e8765876707a33a3406011fe1c11.zip op-kernel-dev-58d925dcede9e8765876707a33a3406011fe1c11.tar.gz |
perf machine: Introduce synthesize_threads method out of open coded equivalent
Further simplifications to be done on following patch, as most tools
don't use the callback, using instead just the canned
machine__process_event one.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-r1m0vuuj3cat4bampno9yc8d@git.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.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index cc96d75..c3a936e 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; |