-70bd9801911f8ed27df410d36a928166c37a68fd
+baf07c40960dc4f8df9da97281870d80d4245b18
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
func kickoff() {
gp := getg()
- if gp.traceback != nil {
+ if gp.traceback != 0 {
gtraceback(gp)
}
} else {
resetNewG(newg, &sp, &spsize)
}
- newg.traceback = nil
+ newg.traceback = 0
if readgstatus(newg) != _Gdead {
throw("newproc1: new g is not Gdead")
isSystemGoroutine bool // whether goroutine is a "system" goroutine
- traceback *tracebackg // stack traceback buffer
+ traceback uintptr // stack traceback buffer
context g_ucontext_t // saved context for setcontext
stackcontext [10]uintptr // split-stack context
}
// traceBufHeader is per-P tracing buffer.
+//go:notinheap
type traceBufHeader struct {
link traceBufPtr // in trace.empty/full
lastTicks uint64 // when we wrote the last event
stk.n = len(pcs)
stkpc := stk.stack()
for i, pc := range pcs {
- stkpc[i] = pc
+ // Use memmove to avoid write barrier.
+ memmove(unsafe.Pointer(&stkpc[i]), unsafe.Pointer(&pc), unsafe.Sizeof(pc))
}
part := int(hash % uintptr(len(tab.tab)))
stk.link = tab.tab[part]
if gp != nil && gp != me {
print("\n")
goroutineheader(gp)
- gp.traceback = (*tracebackg)(noescape(unsafe.Pointer(&tb)))
+ gp.traceback = (uintptr)(noescape(unsafe.Pointer(&tb)))
getTraceback(me, gp)
printtrace(tb.locbuf[:tb.c], nil)
printcreatedby(gp)
print("\tgoroutine in C code; stack unavailable\n")
printcreatedby(gp)
} else {
- gp.traceback = (*tracebackg)(noescape(unsafe.Pointer(&tb)))
+ gp.traceback = (uintptr)(noescape(unsafe.Pointer(&tb)))
getTraceback(me, gp)
printtrace(tb.locbuf[:tb.c], nil)
printcreatedby(gp)
gp = runtime_g();
mp = gp->m;
- if(gp->traceback != nil)
+ if(gp->traceback != 0)
gtraceback(gp);
}
if (gp == nil || !gp->fromgogo) {
#endif
getcontext(ucontext_arg(&me->context[0]));
- if (gp->traceback != nil) {
+ if (gp->traceback != 0) {
runtime_gogo(gp);
}
}
Traceback* traceback;
M* holdm;
- traceback = gp->traceback;
- gp->traceback = nil;
+ traceback = (Traceback*)gp->traceback;
+ gp->traceback = 0;
holdm = gp->m;
if(holdm != nil && holdm != g->m)
runtime_throw("gtraceback: m is not nil");
// multiple times via the setcontext call in mcall.
getcontext(ucontext_arg(&gp->context[0]));
- if(gp->traceback != nil) {
+ if(gp->traceback != 0) {
// Got here from getTraceback.
// I'm not sure this ever actually happens--getTraceback
// may always go to the getcontext call in mcall.