aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-07-18 16:53:45 -0400
committerRuss Cox <rsc@golang.org>2013-07-18 16:53:45 -0400
commit58f12ffd79df8ae369afa7ec60ee26d72ce2d843 (patch)
treeccc2d561a416544b0fe46cc729d244bc47ecd19d /src/pkg/runtime/proc.c
parent8c741c97f710c1e197cd7d2d02d8380dbb759859 (diff)
downloadgo-58f12ffd79df8ae369afa7ec60ee26d72ce2d843.tar.xz
runtime: handle morestack/lessstack in stack trace
If we start a garbage collection on g0 during a stack split or unsplit, we'll see morestack or lessstack at the top of the stack. Record an argument frame size for those, and record that they terminate the stack. R=golang-dev, dvyukov CC=golang-dev https://golang.org/cl/11533043
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r--src/pkg/runtime/proc.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 3ce281fc77..331d382476 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -2499,17 +2499,6 @@ runtime·testSchedLocalQueueSteal(void)
extern void runtime·morestack(void);
-bool
-runtime·haszeroargs(uintptr pc)
-{
- return pc == (uintptr)runtime·goexit ||
- pc == (uintptr)runtime·mcall ||
- pc == (uintptr)runtime·mstart ||
- pc == (uintptr)runtime·lessstack ||
- pc == (uintptr)runtime·morestack ||
- pc == (uintptr)_rt0_go;
-}
-
// Does f mark the top of a goroutine stack?
bool
runtime·topofstack(Func *f)
@@ -2517,5 +2506,7 @@ runtime·topofstack(Func *f)
return f->entry == (uintptr)runtime·goexit ||
f->entry == (uintptr)runtime·mstart ||
f->entry == (uintptr)runtime·mcall ||
+ f->entry == (uintptr)runtime·morestack ||
+ f->entry == (uintptr)runtime·lessstack ||
f->entry == (uintptr)_rt0_go;
}