aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_ppc64x.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-01-14 11:18:24 -0500
committerRuss Cox <rsc@golang.org>2015-01-14 18:33:38 +0000
commit5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920 (patch)
tree261982dd7e9d90851bd718f3d687f6aaafa5a6c5 /src/runtime/sys_linux_ppc64x.s
parent094a054bd08ed1f2d28ae660fe6d65028d4c9723 (diff)
downloadgo-5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920.tar.gz
go-5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920.zip
runtime: log all thread stack traces during GODEBUG=crash on Linux and OS X
Normally, a panic/throw only shows the thread stack for the current thread and all paused goroutines. Goroutines running on other threads, or other threads running on their system stacks, are opaque. Change that when GODEBUG=crash, by passing a SIGQUIT around to all the threads when GODEBUG=crash. If this works out reasonably well, we might make the SIGQUIT relay part of the standard panic/throw death, perhaps eliding idle m's. Change-Id: If7dd354f7f3a6e326d17c254afcf4f7681af2f8b Reviewed-on: https://go-review.googlesource.com/2811 Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
-rw-r--r--src/runtime/sys_linux_ppc64x.s9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s
index b9d8be11c5..1f2a5af50a 100644
--- a/src/runtime/sys_linux_ppc64x.s
+++ b/src/runtime/sys_linux_ppc64x.s
@@ -18,6 +18,8 @@
#define SYS_write 4
#define SYS_open 5
#define SYS_close 6
+#define SYS_getpid 20
+#define SYS_kill 37
#define SYS_fcntl 55
#define SYS_gettimeofday 78
#define SYS_select 82 // always return -ENOSYS
@@ -118,6 +120,13 @@ TEXT runtime·raise(SB),NOSPLIT,$-8
SYSCALL $SYS_tkill
RETURN
+TEXT runtime·raiseproc(SB),NOSPLIT,$-8
+ SYSCALL $SYS_getpid
+ MOVW R3, R3 // arg 1 pid
+ MOVW sig+0(FP), R4 // arg 2
+ SYSCALL $SYS_kill
+ RETURN
+
TEXT runtime·setitimer(SB),NOSPLIT,$-8-24
MOVW mode+0(FP), R3
MOVD new+8(FP), R4