Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c9faa06 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 454c407e
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -666,11 +666,14 @@ static int __cmd_record(int argc, const char **argv)
						     nr_counters,
						     process_synthesized_event,
						     session);
		if (err <= 0) {
			pr_err("Couldn't record tracing data.\n");
			return err;
		}

		/*
		 * FIXME err <= 0 here actually means that there were no tracepoints
		 * so its not really an error, just that we don't need to synthesize
		 * anything.
		 * We really have to return this more properly and also propagate
		 * errors that now are calling die()
		 */
		if (err > 0)
			advance_output(err);
	}