]> Cypherpunks repositories - gostls13.git/commit
runtime: fix memory profiler
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 16 Oct 2014 18:11:26 +0000 (22:11 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 16 Oct 2014 18:11:26 +0000 (22:11 +0400)
commit8f47c837fd4f550c5b3f25f3725c7101c281e363
tree6622677a532dc4798510ca256d75a06ad8899929
parent1552e62d70374f86627d7b845ee6effb38a2aebc
runtime: fix memory profiler
There are 3 issues:
1. Skip argument of callers is off by 3,
so that all allocations are deep inside of memory profiler.
2. Memory profiling statistics are not updated after runtime.GC.
3. Testing package does not update memory profiling statistics
before capturing the profile.
Also add an end-to-end test.
Fixes #8867.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/148710043
src/runtime/mgc0.c
src/runtime/mprof.go
src/runtime/pprof/mprof_test.go [new file with mode: 0644]
src/testing/testing.go