mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
0357c38adf
commit
27ee719fb3
9 changed files with 361 additions and 28 deletions
|
|
@ -26,6 +26,8 @@ var Xadduintptr = xadduintptr
|
|||
|
||||
var FuncPC = funcPC
|
||||
|
||||
var Fastlog2 = fastlog2
|
||||
|
||||
type LFNode struct {
|
||||
Next uint64
|
||||
Pushcnt uintptr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue