paniconfaultbool// panic (instead of crash) on unexpected fault address
preemptscanbool// preempted g does scan for gc
gcscandonebool// g has scanned stack; protected by _Gscan bit in status
gcscanvalidbool// false at start of gc cycle, true if G has not run since last scan; transition from true to false by calling queueRescan and false to true by calling dequeueRescan
throwsplitbool// must not split stack
raceignoreint8// ignore race detection events
sysblocktracedbool// StartTrace has emitted EvGoInSyscall about this goroutine
sysexitticksint64// cputicks when syscall has returned (for tracing)
tracesequint64// trace event sequencer
tracelastppuintptr// last P emitted an event for this goroutine
lockedm*m
siguint32
writebuf[]byte
sigcode0uintptr
sigcode1uintptr
sigpcuintptr
gopcuintptr// pc of go statement that created this goroutine
startpcuintptr// pc of goroutine function
racectxuintptr
waiting*sudog// sudog structures this g is waiting on (that have a valid elem ptr); in lock order
cgoCtxt[]uintptr// cgo traceback context
// gcRescan is this G's index in work.rescan.list. If this is
// -1, this G is not on the rescan list.
//
// If gcphase != _GCoff and this G is visible to the garbage
// collector, writes to this are protected by work.rescan.lock.
gcRescanint32
// gcAssistBytes is this G's GC assist credit in terms of
// bytes allocated. If this is positive, then the G has credit
// to allocate gcAssistBytes bytes without assisting. If this
// is negative, then the G must correct this by performing
// scan work. We track this in bytes to make it fast to update
// and check for debt in the malloc hot path. The assist ratio
// determines how this corresponds to scan work debt.
gcAssistBytesint64
}
typestackstruct{
louintptr
hiuintptr
}
type_panicstruct{
argpunsafe.Pointer// pointer to arguments of deferred call run during panic; cannot move - known to liblink
arginterface{}// argument to panic
link*_panic// link to earlier panic
recoveredbool// whether this panic is over
abortedbool// the panic was aborted
}
type_deferstruct{
sizint32
startedbool
spuintptr// sp at time of defer
pcuintptr
fn*funcval
_panic*_panic// panic that is running defer
link*_defer
}
typegobufstruct{
// The offsets of sp, pc, and g are known to (hard-coded in) libmach.
//
// ctxt is unusual with respect to GC: it may be a
// heap-allocated funcval so write require a write barrier,
// but gobuf needs to be cleared from assembly. We take
// advantage of the fact that the only path that uses a
// non-nil ctxt is morestack. As a result, gogo is the only
// place where it may not already be nil, so gogo uses an
// explicit write barrier. Everywhere else that resets the
// gobuf asserts that ctxt is already nil.
spuintptr
pcuintptr
gguintptr
ctxtunsafe.Pointer// this has to be a pointer so that gc scans it
retuintreg
lruintptr
bpuintptr// for GOEXPERIMENT=framepointer
}
typefuncvalstruct{
fnuintptr
}
typetimerstruct{
iint// heap index
// Timer wakes up at when, and then at when+period, ... (period > 0 only)
// each time calling f(arg, now) in the timer goroutine, so f must be
// a well-behaved function and not block.
whenint64
periodint64
ffunc(interface{},uintptr)
arginterface{}
sequintptr
}
typestkbarstruct{
savedLRPtruintptr// location overwritten by stack barrier PC
savedLRValuintptr// value overwritten at savedLRPtr