aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/pprof
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-07-23 00:14:33 -0400
committerRuss Cox <rsc@golang.org>2015-07-27 16:30:27 +0000
commit6b8762104a90c93ebd51149e7a031738832c5cdc (patch)
tree300a75ec7e50a95eb9f72bd83d1515785de2e87f /src/runtime/pprof
parent9d56c1813e66538cf709d6939440cafa13c275db (diff)
downloadgo-6b8762104a90c93ebd51149e7a031738832c5cdc.tar.xz
runtime/pprof: document content of heap profile
Fixes #11343. Change-Id: I46efc24b687b9d060ad864fbb238c74544348e38 Reviewed-on: https://go-review.googlesource.com/12556 Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/runtime/pprof')
-rw-r--r--src/runtime/pprof/pprof.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go
index 7d888e4ab0..23fc85093b 100644
--- a/src/runtime/pprof/pprof.go
+++ b/src/runtime/pprof/pprof.go
@@ -41,6 +41,13 @@ import (
// These predefined profiles maintain themselves and panic on an explicit
// Add or Remove method call.
//
+// The heap profile reports statistics as of the most recently completed
+// garbage collection; it elides more recent allocation to avoid skewing
+// the profile away from live data and toward garbage.
+// If there has been no garbage collection at all, the heap profile reports
+// all known allocations. This exception helps mainly in programs running
+// without garbage collection enabled, usually for debugging purposes.
+//
// The CPU profile is not available as a Profile. It has a special API,
// the StartCPUProfile and StopCPUProfile functions, because it streams
// output to a writer during profiling.