diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-08-05 22:55:54 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-08-05 22:55:54 +0400 |
| commit | f73972fa333ad3291c9b7118cf7ca129a758cb66 (patch) | |
| tree | 2f5d34eeedf2b96892b6a259c5485101bda532fc /src/pkg/runtime/runtime.h | |
| parent | 20a2b960898a37e646bf76dcf0e3fd067a387c5f (diff) | |
| download | go-f73972fa333ad3291c9b7118cf7ca129a758cb66.tar.xz | |
runtime: use gcpc/gcsp during traceback of goroutines in syscalls
gcpc/gcsp are used by GC in similar situation.
gcpc/gcsp are also more stable than gp->sched,
because gp->sched is mutated by entersyscall/exitsyscall
in morestack and mcall. So it has higher chances of being inconsistent.
Also, rename gcpc/gcsp to syscallpc/syscallsp.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12250043
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 1ecdfffcab..15520b57eb 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -253,10 +253,10 @@ struct G Defer* defer; Panic* panic; Gobuf sched; - uintptr gcstack; // if status==Gsyscall, gcstack = stackbase to use during gc - uintptr gcsp; // if status==Gsyscall, gcsp = sched.sp to use during gc - uintptr gcpc; // if status==Gsyscall, gcpc = sched.pc to use during gc - uintptr gcguard; // if status==Gsyscall, gcguard = stackguard to use during gc + uintptr syscallstack; // if status==Gsyscall, syscallstack = stackbase to use during gc + uintptr syscallguard; // if status==Gsyscall, syscallguard = stackguard to use during gc + uintptr syscallsp; // if status==Gsyscall, syscallsp = sched.sp to use during gc + uintptr syscallpc; // if status==Gsyscall, syscallpc = sched.pc to use during gc uintptr stackguard; // same as stackguard0, but not set to StackPreempt uintptr stack0; G* alllink; // on allg |
