if raceenabled {
gp.racectx = racegostart(abi.FuncPCABIInternal(newextram) + sys.PCQuantum)
}
- trace := traceAcquire()
- if trace.ok() {
- trace.OneNewExtraM(gp)
- traceRelease(trace)
- }
// put on allg for garbage collector
allgadd(gp)
freemcache(pp.mcache)
pp.mcache = nil
gfpurge(pp)
- traceProcFree(pp)
if raceenabled {
if pp.timers.raceCtx != 0 {
// The race detector code uses a callback to fetch
tl.eventWriter(traceGoRunning, traceProcRunning).commit(traceEvHeapGoal, traceArg(heapGoal))
}
-// OneNewExtraM is a no-op in the new tracer. This is worth keeping around though because
-// it's a good place to insert a thread-level event about the new extra M.
-func (tl traceLocker) OneNewExtraM(_ *g) {
-}
-
// GoCreateSyscall indicates that a goroutine has transitioned from dead to GoSyscall.
//
// Unlike GoCreate, the caller must be running on gp.
traceRelease(tl)
}
-// traceProcFree is called when a P is destroyed.
-//
-// This must run on the system stack to match the old tracer.
-//
-//go:systemstack
-func traceProcFree(_ *p) {
-}
-
// traceThreadDestroy is called when a thread is removed from
// sched.freem.
//
throw("bad use of trace.seqlock")
}
}
-
-// Not used in the new tracer; solely for compatibility with the old tracer.
-// nosplit because it's called from exitsyscall without a P.
-//
-//go:nosplit
-func (_ traceLocker) RecordSyscallExitedTime(_ *g, _ *p) {
-}