From 01c6a19e041f6b316c17a065f7a42b8dab57c9da Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 6 Dec 2016 17:42:42 -0500 Subject: 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 --- api/go1.8.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'api') diff --git a/api/go1.8.txt b/api/go1.8.txt index d93de98e1a..6ca0f3638c 100644 --- a/api/go1.8.txt +++ b/api/go1.8.txt @@ -238,6 +238,7 @@ pkg plugin, type Symbol interface {} pkg reflect, func Swapper(interface{}) func(int, int) pkg runtime, func MutexProfile([]BlockProfileRecord) (int, bool) pkg runtime, func SetMutexProfileFraction(int) int +pkg runtime, type MemStats struct, NumForcedGC uint32 pkg sort, func Slice(interface{}, func(int, int) bool) pkg sort, func SliceIsSorted(interface{}, func(int, int) bool) bool pkg sort, func SliceStable(interface{}, func(int, int) bool) -- cgit v1.2.1