mirror of https://github.com/golang/go.git
runtime: don't assume arena is in address order
On amd64, the arena is no longer in address space order, but currently the heap dumper assumes that it is. Fix this assumption. Change-Id: Iab1953cd36b359d0fb78ed49e5eb813116a18855 Reviewed-on: https://go-review.googlesource.com/96776 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
This commit is contained in:
parent
b86e766813
commit
9680980efe
|
|
@ -491,10 +491,13 @@ func dumpparams() {
|
|||
var arenaStart, arenaEnd uintptr
|
||||
for i, ha := range mheap_.arenas {
|
||||
if ha != nil {
|
||||
if arenaStart == 0 {
|
||||
arenaStart = arenaBase(uint(i))
|
||||
base := arenaBase(uint(i))
|
||||
if arenaStart == 0 || base < arenaStart {
|
||||
arenaStart = base
|
||||
}
|
||||
if base+heapArenaBytes > arenaEnd {
|
||||
arenaEnd = base + heapArenaBytes
|
||||
}
|
||||
arenaEnd = arenaBase(uint(i)) + heapArenaBytes
|
||||
}
|
||||
}
|
||||
dumpint(uint64(arenaStart))
|
||||
|
|
|
|||
Loading…
Reference in New Issue