Update prebuilts to go1.10 ab/4625579
Test: m -j blueprint_tools
Change-Id: I12d0286a2978fcbafa50880625700ba69c4581d8
diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go
index 1cb44a1..e6f2f00 100644
--- a/src/runtime/mstats.go
+++ b/src/runtime/mstats.go
@@ -262,7 +262,7 @@
// can only be used for other objects of roughly the same
// size.
//
- // HeapInuse minus HeapAlloc esimates the amount of memory
+ // HeapInuse minus HeapAlloc estimates the amount of memory
// that has been dedicated to particular size classes, but is
// not currently being used. This is an upper bound on
// fragmentation, but in general this memory can be reused
@@ -589,12 +589,13 @@
memstats.heap_objects = memstats.nmalloc - memstats.nfree
}
+// cachestats flushes all mcache stats.
+//
+// The world must be stopped.
+//
//go:nowritebarrier
func cachestats() {
- for _, p := range &allp {
- if p == nil {
- break
- }
+ for _, p := range allp {
c := p.mcache
if c == nil {
continue
@@ -610,9 +611,6 @@
//go:nowritebarrier
func flushmcache(i int) {
p := allp[i]
- if p == nil {
- return
- }
c := p.mcache
if c == nil {
return
@@ -666,7 +664,7 @@
// overflow errors.
//go:nosplit
func mSysStatInc(sysStat *uint64, n uintptr) {
- if sys.BigEndian != 0 {
+ if sys.BigEndian {
atomic.Xadd64(sysStat, int64(n))
return
}
@@ -680,7 +678,7 @@
// mSysStatInc apply.
//go:nosplit
func mSysStatDec(sysStat *uint64, n uintptr) {
- if sys.BigEndian != 0 {
+ if sys.BigEndian {
atomic.Xadd64(sysStat, -int64(n))
return
}