diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-09-17 16:34:28 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-09-19 11:32:17 -0300 |
commit | 33e940a25daaea71be054e8a4bdb61730cc9ebbc (patch) | |
tree | e8d2f1f31f631290eb11da1c2b5a609b09a360be /tools/perf/util/session.h | |
parent | e955d5c434009b661dbb200c601254b0c2d9940a (diff) |
perf session: Check for SIGINT in more loops
When processing big files we were not checking if session_done was set
by the SIGINT signal handler, for instance in 'perf report'. Fix it.
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-pyad42lgrtq7xhg2dpsoauq7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.h')
-rw-r--r-- | tools/perf/util/session.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 3aa75fb2225..04bf7373a7e 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -124,4 +124,8 @@ int __perf_session__set_tracepoints_handlers(struct perf_session *session, #define perf_session__set_tracepoints_handlers(session, array) \ __perf_session__set_tracepoints_handlers(session, array, ARRAY_SIZE(array)) + +extern volatile int session_done; + +#define session_done() (*(volatile int *)(&session_done)) #endif /* __PERF_SESSION_H */ |