diff options
author | Andi Kleen <ak@linux.intel.com> | 2011-09-15 14:31:40 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-09-29 17:09:46 -0300 |
commit | 33e49ea70df066651a17061c62118fc3f075d21f (patch) | |
tree | 8eaa17e37ceb8398859e944385cac328ffcaa1c7 /tools/perf/builtin-stat.c | |
parent | 61a9f324292e6dd4f4b99f5366454788104a0bd9 (diff) |
perf tools: Make stat/record print fatal signals of the target program
When a program crashes under perf there is no message about it, unlike
when running it from bash. This can be confusing and lead to wrong
actions during debugging.
Print fatal signals in perf stat/record.
Thanks to Furat Afram for finding the problem originally
Link: http://lkml.kernel.org/r/1316122302-24306-1-git-send-email-andi@firstfloor.org
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r-- | tools/perf/builtin-stat.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index b5673194870..7ce65f52415 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -495,6 +495,8 @@ static int run_perf_stat(int argc __used, const char **argv) if (forks) { close(go_pipe[1]); wait(&status); + if (WIFSIGNALED(status)) + psignal(WTERMSIG(status), argv[0]); } else { while(!done) sleep(1); } |