Skip to content

Commit

Permalink
internal/gocore: update for CL 537978
Browse files Browse the repository at this point in the history
CL 537978 moved some fields in heapArena to a new struct. Update
references.

Fixes golang/go#63359.

Change-Id: I01bdbd6673249ac039bfd8e1890f19eab35e164f
Reviewed-on: https://go-review.googlesource.com/c/debug/+/540297
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
prattmic authored and gopherbot committed Nov 7, 2023
1 parent 7e676ac commit d6d0e89
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/gocore/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,15 @@ func (p *Process) readHeap() {

min := core.Address(arenaSize*(level2+level1*level2size) - arenaBaseOffset)
max := min.Add(arenaSize)
bitmap := a.Field("bitmap")
oneBitBitmap := a.HasField("noMorePtrs") // Starting in 1.20.
var bitmap region
var oneBitBitmap bool
if a.HasField("heapArenaPtrScalar") { // go 1.22
bitmap = a.Field("heapArenaPtrScalar").Field("bitmap")
oneBitBitmap = true
} else {
bitmap = a.Field("bitmap")
oneBitBitmap = a.HasField("noMorePtrs") // Starting in 1.20.
}
spans := a.Field("spans")

arenas = append(arenas, arena{
Expand Down

0 comments on commit d6d0e89

Please sign in to comment.