diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-08-01 19:28:38 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-08-01 19:28:38 +0400 |
| commit | c33d49002069e798b33d0de42d3eb5073aef7c0b (patch) | |
| tree | 3d5b9cf23b1f319ac56c02fb61530db8c03a0a8d /src/pkg/runtime/proc.c | |
| parent | 3cbc2716a94e836097f40dd3d7dd7b46f0fbbe50 (diff) | |
| download | go-c33d49002069e798b33d0de42d3eb5073aef7c0b.tar.xz | |
runtime: print "created by" for running goroutines in traceback
This allows to at least determine goroutine "identity".
Now it looks like:
goroutine 12 [running]:
goroutine running on other thread; stack unavailable
created by testing.RunTests
src/pkg/testing/testing.go:440 +0x88e
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/12248043
Diffstat (limited to 'src/pkg/runtime/proc.c')
| -rw-r--r-- | src/pkg/runtime/proc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index c3af1efaf3..79568503b7 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -267,9 +267,10 @@ runtime·tracebackothers(G *me) continue; runtime·printf("\n"); runtime·goroutineheader(gp); - if(gp->status == Grunning) + if(gp->status == Grunning) { runtime·printf("\tgoroutine running on other thread; stack unavailable\n"); - else + runtime·printcreatedby(gp); + } else runtime·traceback(gp->sched.pc, gp->sched.sp, gp->sched.lr, gp); } } |
