aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/traceallocfree.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/traceallocfree.go')
-rw-r--r--src/runtime/traceallocfree.go10
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)
}