go/src/internal
Hana Kim 2ff1e3ebf5 net/http/pprof: support the "seconds" param for block, mutex profiles
When the seconds param is given, the block and mutex profile endpoints
report the difference between two measurements collected the given
seconds apart. Historically, the block and mutex profiles have reported
the cumulative counts since the process start, and it turned out they
are more useful when interpreted along with the time duration.

Note: cpu profile and trace endpoints already accept the "seconds"
parameter. With this CL, the block and mutex profile endpoints will
accept the "seconds" parameter. Providing the "seconds" parameter
to other types of profiles is an error.

This change moves runtime/pprof/internal/profile to internal/profile and
adds part of merge logic from github.com/google/pprof/profile/merge.go to
internal/profile, in order to allow both net/http/pprof and runtime/pprof
to access it.

Fixes #23401

Change-Id: Ie2486f1a63eb8ff210d7d3bc2de683e9335fd5cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/147598
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-04-17 19:35:56 +00:00
..
bytealg strings, bytes: improve IndexAny and LastIndexAny performance 2020-03-11 05:13:13 +00:00
cfg cmd/go: allow configuring module cache directory with GOMODCACHE 2020-04-08 17:51:12 +00:00
cpu internal/cpu: unify HWCap/HWCap2 comments 2020-04-13 10:26:24 +00:00
fmtsort src: gofmt -s 2019-09-09 18:57:05 +00:00
goroot internal/goroot: for -compiler=gccgo, only look for .gox files 2019-09-18 20:32:43 +00:00
goversion internal/goversion: update to 1.14 2019-10-01 22:07:45 +00:00
lazyregexp internal/lazytemplate: add a lazy template wrapper 2019-02-27 23:49:01 +00:00
lazytemplate internal/lazytemplate: add a lazy template wrapper 2019-02-27 23:49:01 +00:00
nettrace
obscuretestdata all: base64-encode binaries that will cause Apple notarization to fail 2019-11-21 14:55:12 +00:00
oserror all: remove os.ErrTimeout 2019-08-02 17:57:18 +00:00
poll internal/syscall/windows: change WSAMsg.Name type 2020-04-02 09:00:44 +00:00
profile net/http/pprof: support the "seconds" param for block, mutex profiles 2020-04-17 19:35:56 +00:00
race
reflectlite reflect, internal/reflectlite: set capacity when slicing unsafe pointers 2019-10-21 23:16:36 +00:00
singleflight internal/singleflight: format someErr 2019-10-25 16:31:41 +00:00
syscall internal/syscall/windows: change WSAMsg.Name type 2020-04-02 09:00:44 +00:00
testenv all: remove scattered remnants of darwin/arm 2020-04-08 18:35:49 +00:00
testlog
trace all: shorten some tests 2019-05-22 12:54:00 +00:00
xcoff internal/xcoff: fix wrong bit masking comparisons 2020-03-09 18:07:53 +00:00