aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/traceallocfree.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2025-03-04 19:02:48 +0000
committerGopher Robot <gobot@golang.org>2025-04-23 08:00:33 -0700
commit528bafa0498bb26a3b3961fa5bf50d02bd7101bb (patch)
treeeb72406f4a0ce690d368b2377e2df031457775ca /src/runtime/traceallocfree.go
parentecdd429a3be7abde6e169b79da13bffdba064cb4 (diff)
downloadgo-528bafa0498bb26a3b3961fa5bf50d02bd7101bb.tar.xz
runtime: move sizeclass defs to new package internal/runtime/gc
We will want to reference these definitions from new generator programs, and this is a good opportunity to cleanup all these old C-style names. Change-Id: Ifb06f0afc381e2697e7877f038eca786610c96de Reviewed-on: https://go-review.googlesource.com/c/go/+/655275 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/traceallocfree.go')
-rw-r--r--src/runtime/traceallocfree.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/traceallocfree.go b/src/runtime/traceallocfree.go
index 40f1cfe8ab..70e48ea3a6 100644
--- a/src/runtime/traceallocfree.go
+++ b/src/runtime/traceallocfree.go
@@ -8,6 +8,7 @@ package runtime
import (
"internal/abi"
+ "internal/runtime/gc"
"internal/runtime/sys"
"internal/trace/tracev2"
)
@@ -38,7 +39,7 @@ func traceSnapshotMemory(gen uintptr) {
// Emit info.
w.varint(uint64(trace.minPageHeapAddr))
w.varint(uint64(pageSize))
- w.varint(uint64(minHeapAlign))
+ w.varint(uint64(gc.MinHeapAlign))
w.varint(uint64(fixedStack))
// Finish writing the batch.
@@ -129,7 +130,7 @@ func (tl traceLocker) HeapObjectFree(addr uintptr) {
// traceHeapObjectID creates a trace ID for a heap object at address addr.
func traceHeapObjectID(addr uintptr) traceArg {
- return traceArg(uint64(addr)-trace.minPageHeapAddr) / minHeapAlign
+ return traceArg(uint64(addr)-trace.minPageHeapAddr) / gc.MinHeapAlign
}
// GoroutineStackExists records that a goroutine stack already exists at address base with the provided size.