Skip to contentSkip to conversation

perf trace: Check control+C more often

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Sep 6, 2013 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  20c5f10eb5d1767087dd8eccfe4efe325e61cded
Gitweb:     http://git.kernel.org/tip/20c5f10eb5d1767087dd8eccfe4efe325e61cded
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 3 Sep 2013 11:55:07 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 5 Sep 2013 16:17:25 -0300

perf trace: Check control+C more often

We were checking for it only after processing all events in the buffer, delaying processing the termination request for long periods.

Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/builtin-trace.c | 3 +++
 1 file changed, 3 insertions(+)
tools/perf/builtin-trace.c +3 -0
index b6f0725..6016112 100644
@@ -994,6 +994,9 @@ again:
 
 			handler = evsel->handler.func;
 			handler(trace, evsel, &sample);
+
+			if (done)
+				goto out_unmap_evlist;
 		}
 	}