aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-02 12:37:24 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-02 12:37:24 -0400
commit2c9faa060064343a4a0b16f5b77f3c61d1d17e23 (patch)
treea777f00991bca2a82fc2dcff3f7335890fd0abc2 /tools/perf/builtin-record.c
parent454c407ec17a0c63e4023ac0877d687945a7df4a (diff)
perf record: Don't exit in live mode when no tracepoints are enabled
With this I was able to actually test Tom Zanussi's two previous patches in my usual perf testing ways, i.e. without any tracepoints activated. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> 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.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index e382d93d369..ac989e9ba8f 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -666,12 +666,15 @@ static int __cmd_record(int argc, const char **argv)
666 nr_counters, 666 nr_counters,
667 process_synthesized_event, 667 process_synthesized_event,
668 session); 668 session);
669 if (err <= 0) { 669 /*
670 pr_err("Couldn't record tracing data.\n"); 670 * FIXME err <= 0 here actually means that there were no tracepoints
671 return err; 671 * so its not really an error, just that we don't need to synthesize
672 } 672 * anything.
673 673 * We really have to return this more properly and also propagate
674 advance_output(err); 674 * errors that now are calling die()
675 */
676 if (err > 0)
677 advance_output(err);
675 } 678 }
676 679
677 machine = perf_session__find_host_machine(session); 680 machine = perf_session__find_host_machine(session);