diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-09-17 21:34:28 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-09-19 16:32:17 +0200 |
commit | 33e940a25daaea71be054e8a4bdb61730cc9ebbc (patch) | |
tree | e8d2f1f31f631290eb11da1c2b5a609b09a360be /tools/perf/builtin-report.c | |
parent | perf tools: Fix compile with libelf without get_phdrnum (diff) | |
download | linux-33e940a25daaea71be054e8a4bdb61730cc9ebbc.tar.xz linux-33e940a25daaea71be054e8a4bdb61730cc9ebbc.zip |
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/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 8e50d8d77419..72eae7498c09 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -401,8 +401,6 @@ static int perf_report__setup_sample_type(struct perf_report *rep) return 0; } -extern volatile int session_done; - static void sig_handler(int sig __maybe_unused) { session_done = 1; @@ -568,6 +566,9 @@ static int __cmd_report(struct perf_report *rep) } } + if (session_done()) + return 0; + if (nr_samples == 0) { ui__error("The %s file has no samples!\n", session->filename); return 0; |