Commit 77026ef9 authored by Emmanuel Odeke's avatar Emmanuel Odeke Committed by Austin Clements

runtime: document heap scavenger memory summary

Fixes #15212.

Change-Id: I2628ec8333330721cddc5145af1ffda6f3e0c63f
Reviewed-on: https://go-review.googlesource.com/23319Reviewed-by: default avatarAustin Clements <austin@google.com>
parent bc4fdfdb
...@@ -82,6 +82,21 @@ It is a comma-separated list of name=val pairs setting these named variables: ...@@ -82,6 +82,21 @@ It is a comma-separated list of name=val pairs setting these named variables:
If the line ends with "(forced)", this GC was forced by a If the line ends with "(forced)", this GC was forced by a
runtime.GC() call and all phases are STW. runtime.GC() call and all phases are STW.
Setting gctrace to any value > 0 also causes the garbage collector
to emit a summary when memory is released back to the system.
This process of returning memory to the system is called scavenging.
The format of this summary is subject to change.
Currently it is:
scvg#: # MB released printed only if non-zero
scvg#: inuse: # idle: # sys: # released: # consumed: # (MB)
where the fields are as follows:
scvg# the scavenge cycle number, incremented at each scavenge
inuse: # MB used or partially used spans
idle: # MB spans pending scavenging
sys: # MB mapped from the system
released: # MB released to the system
consumed: # MB allocated from the system
memprofilerate: setting memprofilerate=X will update the value of runtime.MemProfileRate. memprofilerate: setting memprofilerate=X will update the value of runtime.MemProfileRate.
When set to 0 memory profiling is disabled. Refer to the description of When set to 0 memory profiling is disabled. Refer to the description of
MemProfileRate for the default value. MemProfileRate for the default value.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment