diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-11 09:28:02 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-11 13:56:39 -0500 |
commit | 58d925dcede9e8765876707a33a3406011fe1c11 (patch) | |
tree | f2fe20989a9d7be863f746d970e999d3f1ec3458 /tools/perf/builtin-record.c | |
parent | 62605dc50c27bf0e4ff69b7b3166f226586aff02 (diff) |
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-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index afb252cf6eca..41d1f37f5348 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -480,16 +480,8 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv) | |||
480 | perf_event__synthesize_guest_os, tool); | 480 | perf_event__synthesize_guest_os, tool); |
481 | } | 481 | } |
482 | 482 | ||
483 | if (perf_target__has_task(&opts->target)) | 483 | err = machine__synthesize_threads(machine, tool, &opts->target, evsel_list->threads, |
484 | err = perf_event__synthesize_thread_map(tool, evsel_list->threads, | 484 | process_synthesized_event, opts->sample_address); |
485 | process_synthesized_event, | ||
486 | machine, opts->sample_address); | ||
487 | else if (perf_target__has_cpu(&opts->target)) | ||
488 | err = perf_event__synthesize_threads(tool, process_synthesized_event, | ||
489 | machine, opts->sample_address); | ||
490 | else /* command specified */ | ||
491 | err = 0; | ||
492 | |||
493 | if (err != 0) | 485 | if (err != 0) |
494 | goto out_delete_session; | 486 | goto out_delete_session; |
495 | 487 | ||