Skip to content

Commit

Permalink
perf tools: Use same signal handling strategy as 'record'
Browse files Browse the repository at this point in the history
I.e. don't exit with the signal number, instead set the signal handler
to the default one and then raise it again.

Noticed while trying to dump the stack at segfaults in the 'perf test'
forked process used to run each test, that inspects signal info at
each test.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-5x5r176wnoqxi5p6id05wv9w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Dec 14, 2015
1 parent 0d76ded commit 9daddf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/perf/util/util.c
Original file line number Diff line number Diff line change
@@ -352,7 +352,8 @@ void sighandler_dump_stack(int sig)
{
psignal(sig, "perf");
dump_stack();
exit(sig);
signal(sig, SIG_DFL);
raise(sig);
}

int parse_nsec_time(const char *str, u64 *ptime)

0 comments on commit 9daddf6

Please sign in to comment.