]> Cypherpunks repositories - gostls13.git/commit
runtime: add number of forced GCs to MemStats
authorAustin Clements <austin@google.com>
Tue, 6 Dec 2016 22:42:42 +0000 (17:42 -0500)
committerAustin Clements <austin@google.com>
Wed, 7 Dec 2016 20:59:16 +0000 (20:59 +0000)
commit01c6a19e041f6b316c17a065f7a42b8dab57c9da
tree6a67ca68f6df3ba461a717ab3591dc2bddd8381c
parentd4177877c6d6e710d77dd8c94b91f8567f1aaa87
runtime: add number of forced GCs to MemStats

This adds a counter for the number of times the application forced a
GC by, e.g., calling runtime.GC(). This is useful for detecting
applications that are overusing/abusing runtime.GC() or
debug.FreeOSMemory().

Fixes #18217.

Change-Id: I990ab7a313c1b3b7a50a3d44535c460d7c54f47d
Reviewed-on: https://go-review.googlesource.com/34067
Reviewed-by: Russ Cox <rsc@golang.org>
api/go1.8.txt
src/runtime/malloc_test.go
src/runtime/mgc.go
src/runtime/mstats.go