mirror of https://github.com/golang/go.git
runtime/trace: record HeapGoal when StartTrace
Fixes #52517 Change-Id: I06aa6112f14f264360c3bb0ffd4e1cd54ad22514 Reviewed-on: https://go-review.googlesource.com/c/go/+/401777 Reviewed-by: hopehook <hopehook@golangcn.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
4f5859c046
commit
192814985d
|
|
@ -318,6 +318,9 @@ func StartTrace() error {
|
||||||
|
|
||||||
unlock(&sched.sysmonlock)
|
unlock(&sched.sysmonlock)
|
||||||
|
|
||||||
|
// Record the current state of HeapGoal to avoid information loss in trace.
|
||||||
|
traceHeapGoal()
|
||||||
|
|
||||||
startTheWorldGC()
|
startTheWorldGC()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue