mirror of
https://github.com/golang/go
synced 2024-11-20 04:54:44 -07:00
d384545a45
The flag disables stripping of runtime frames in profiles. This is useful when analyzing runtime itself. Before: $ go tool pprof --text --alloc_objects --lines fmt.test /tmp/mprof flat flat% sum% cum cum% 2768 79.65% 79.65% 32768 79.65% fmt_test.TestComplexFormatting fmt/fmt_test.go:744 6554 15.93% 95.58% 6554 15.93% regexp/syntax.(*compiler).rune regexp/syntax/compile.go:267 1820 4.42% 100% 1820 4.42% runtime.malg runtime/proc1.go:1977 After: $ go tool pprof --text --alloc_objects --lines --runtime fmt.test /tmp/mprof flat flat% sum% cum cum% 32768 79.65% 79.65% 32768 79.65% runtime.convT2E runtime/iface.go:139 6554 15.93% 95.58% 6554 15.93% runtime.growslice runtime/slice.go:89 1820 4.42% 100% 1820 4.42% runtime.malg runtime/proc1.go:1977 Change-Id: If468dfa5c5bbd0809c45a58d912d3115fac009ed Reviewed-on: https://go-review.googlesource.com/5291 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org> |
||
---|---|---|
.. | ||
internal | ||
doc.go | ||
pprof.go | ||
README |
The pprof in this directory is adapted from the pprof used inside Google for C++, Java, and Go programs. Because it was developed for that broader context, it is overgeneralized when used here for the specific use case of profiling standard Go programs. However, we've left the abstractions intact in order to share updates between this copy and Google's internal one. Please do not take the level of abstraction in this program as an example to follow in your own.