diff --git a/src/runtime/trace.go b/src/runtime/trace.go index 174875264c..14364ea5a7 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -318,6 +318,9 @@ func StartTrace() error { unlock(&sched.sysmonlock) + // Record the current state of HeapGoal to avoid information loss in trace. + traceHeapGoal() + startTheWorldGC() return nil }