* [tip:perf/core] perf test: Dump the stack when test segfaults when in verbose mode
@ 2015-12-18 8:46 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2015-12-18 8:46 UTC (permalink / raw)
To: linux-tip-commits
Cc: hpa, jolsa, acme, tglx, namhyung, wangnan0, adrian.hunter,
dsahern, mingo, linux-kernel
Commit-ID: b6847d2c2a50e96680e233ce4b2784981b6f309e
Gitweb: http://git.kernel.org/tip/b6847d2c2a50e96680e233ce4b2784981b6f309e
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Fri, 11 Dec 2015 19:06:53 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Dec 2015 12:08:55 -0300
perf test: Dump the stack when test segfaults when in verbose mode
E.g.:
# perf test 26
26: Test mmap thread lookup : FAILED!
# perf test -v 26
26: Test mmap thread lookup :
--- start ---
test child forked, pid 9269
tid = 9269, map = 0x7ff99ff0c000
tid = 9270, map = 0x7ff99ff0b000
tid = 9271, map = 0x7ff99ff0a000
tid = 9272, map = 0x7ff99ff09000
perf: Segmentation fault
Obtained 13 stack frames.
perf(sighandler_dump_stack+0x41) [0x4e3541]
/lib64/libc.so.6(+0x34960) [0x7ff99d5f6960]
perf(thread__put+0x5b) [0x4c6f6b]
perf(machine__process_event+0x14e) [0x4bd37e]
perf(perf_event__synthesize_threads+0x3aa) [0x48678a]
perf(test__mmap_thread_lookup+0x20a) [0x474e0a]
perf() [0x460d56]
perf(cmd_test+0x589) [0x461319]
perf() [0x47c641]
perf(main+0x617) [0x422317]
/lib64/libc.so.6(__libc_start_main+0xf0) [0x7ff99d5e1fe0]
perf() [0x422429]
[(nil)]
test child interrupted
---- end ----
Test mmap thread lookup: FAILED!
#
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-sypazzsl4ptctrmlyi2zcmaj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/builtin-test.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 2b1ade1..fa98406 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -236,6 +236,9 @@ static int run_test(struct test *test, int subtest)
dup2(STDOUT_FILENO, STDERR_FILENO);
close(nullfd);
}
+ } else {
+ signal(SIGSEGV, sighandler_dump_stack);
+ signal(SIGFPE, sighandler_dump_stack);
}
err = test->func(subtest);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-12-18 8:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-18 8:46 [tip:perf/core] perf test: Dump the stack when test segfaults when in verbose mode tip-bot for Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.