aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mgcmark.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2016-04-28 10:59:00 -0400
committerAustin Clements <austin@google.com>2016-04-29 03:53:14 +0000
commitb7adc41fbacac446c1daf0cb282cb2a921d4a15b (patch)
tree119544779047b45d98afae79361295a2f0608c11 /src/runtime/mgcmark.go
parent2e8b74b69574e969b5565e69cb54d39064b2dba1 (diff)
downloadgo-b7adc41fbacac446c1daf0cb282cb2a921d4a15b.tar.xz
[dev.garbage] runtime: use s.base() everywhere it makes sense
Currently we have lots of (s.start << _PageShift) and variants. We now have an s.base() function that returns this. It's faster and more readable, so use it. Change-Id: I888060a9dae15ea75ca8cc1c2b31c905e71b452b Reviewed-on: https://go-review.googlesource.com/22559 Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mgcmark.go')
-rw-r--r--src/runtime/mgcmark.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go
index 18f930f89a..14449c3d4b 100644
--- a/src/runtime/mgcmark.go
+++ b/src/runtime/mgcmark.go
@@ -1247,7 +1247,7 @@ func gcDumpObject(label string, obj, off uintptr) {
print(" s=nil\n")
return
}
- print(" s.start*_PageSize=", hex(s.start*_PageSize), " s.limit=", hex(s.limit), " s.sizeclass=", s.sizeclass, " s.elemsize=", s.elemsize, "\n")
+ print(" s.base()=", hex(s.base()), " s.limit=", hex(s.limit), " s.sizeclass=", s.sizeclass, " s.elemsize=", s.elemsize, "\n")
skipped := false
for i := uintptr(0); i < s.elemsize; i += sys.PtrSize {
// For big objects, just print the beginning (because