]> Cypherpunks.ru repositories - gostls13.git/commit
pprof: improve sampling for heap profiling
authorRaul Silvera <rsilvera@google.com>
Mon, 14 Sep 2015 21:03:45 +0000 (14:03 -0700)
committerMinux Ma <minux@golang.org>
Mon, 5 Oct 2015 08:15:09 +0000 (08:15 +0000)
commit27ee719fb32b47b9bc59921e457f4b1e7f767968
tree61845f2dc10b387dac8b4fe5c4ff7b5ae6fd4ad4
parent0357c38adfd5d368390d82a2ab5b32748e4bb549
pprof: improve sampling for heap profiling

The current heap sampling introduces some bias that interferes
with unsampling, producing unexpected heap profiles.
The solution is to use a Poisson process to generate the
sampling points, using the formulas described at
https://en.wikipedia.org/wiki/Poisson_process

This fixes #12620

Change-Id: If2400809ed3c41de504dd6cff06be14e476ff96c
Reviewed-on: https://go-review.googlesource.com/14590
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/export_test.go
src/runtime/fastlog2.go [new file with mode: 0644]
src/runtime/fastlog2_test.go [new file with mode: 0644]
src/runtime/fastlog2table.go [new file with mode: 0644]
src/runtime/malloc.go
src/runtime/mcache.go
src/runtime/mkfastlog2table.go [new file with mode: 0644]
src/runtime/runtime.go
test/heapsampling.go [new file with mode: 0644]