runtime: convert mprof.goc to mprof.go
The exported Go definitions appearing in mprof.go are
copied verbatim from debug.go.
The unexported Go funcs and types are new.
The C Bucket type used a union and was not a line-for-line translation.
LGTM=remyoudompheng
R=golang-codereviews, remyoudompheng
CC=dvyukov, golang-codereviews, iant, khr, r
https://golang.org/cl/137040043
diff --git a/src/pkg/runtime/malloc.go b/src/pkg/runtime/malloc.go
index 49afc67..5b1825a 100644
--- a/src/pkg/runtime/malloc.go
+++ b/src/pkg/runtime/malloc.go
@@ -397,9 +397,8 @@
}
c.next_sample = next
}
- mp.scalararg[0] = uintptr(size)
- mp.ptrarg[0] = x
- onM(&mprofMalloc_m)
+
+ mProf_Malloc(x, size)
}
// force = 1 - do GC regardless of current heap usage