diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2024-05-21 04:15:40 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-05-22 20:32:51 +0000 |
| commit | b6fa505c4a3508600a4e4d7834228046b0310873 (patch) | |
| tree | 01fa8f804f20ea4cee12fca19cef7f4658a872fc /src/runtime/traceallocfree.go | |
| parent | 1110c4095e3ce91eabd830161b6b0836eba4263c (diff) | |
| download | go-b6fa505c4a3508600a4e4d7834228046b0310873.tar.xz | |
runtime: move goroutine stack exists events after span events
Preserving an ordering wherein spans are always named before their
constituents makes parsing much more straightforward.
Change-Id: Ida8764801a6c516d672ba343e4ce01b66ce9b427
Reviewed-on: https://go-review.googlesource.com/c/go/+/586999
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/traceallocfree.go')
| -rw-r--r-- | src/runtime/traceallocfree.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/traceallocfree.go b/src/runtime/traceallocfree.go index 67c6f40926..e6a2a79c69 100644 --- a/src/runtime/traceallocfree.go +++ b/src/runtime/traceallocfree.go @@ -49,11 +49,6 @@ func traceSnapshotMemory(gen uintptr) { throw("traceSnapshotMemory: tracing is not enabled") } - // Write out all the goroutine stacks. - forEachGRace(func(gp *g) { - trace.GoroutineStackExists(gp.stack.lo, gp.stack.hi-gp.stack.lo) - }) - // Write out all the heap spans and heap objects. for _, s := range mheap_.allspans { if s.state.get() == mSpanDead { @@ -77,6 +72,11 @@ func traceSnapshotMemory(gen uintptr) { abits.advance() } } + + // Write out all the goroutine stacks. + forEachGRace(func(gp *g) { + trace.GoroutineStackExists(gp.stack.lo, gp.stack.hi-gp.stack.lo) + }) traceRelease(trace) } |
