From 8c838192b84c062ccf208809320cab68d762a973 Mon Sep 17 00:00:00 2001 From: Hitoshi Mitake Date: Wed, 13 Jan 2016 23:06:27 +0900 Subject: [PATCH] runtime: don't print EnableGC flag in WriteHeapProfile() Current runtime.WriteHeapProfile() doesn't print correct EnableGC. Even if GOGC=off, the result file has below line: # EnableGC = true It is hard to print correct status of the variable because of corner cases e.g. initialization. For avoiding confusion, this commit removes the print. Change-Id: Ia792454a6c650bdc50a06fbaff4df7b6330ae08a Reviewed-on: https://go-review.googlesource.com/18600 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Minux Ma --- src/runtime/pprof/pprof.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index 901467fa9a..728c3dc24a 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -485,7 +485,6 @@ func writeHeap(w io.Writer, debug int) error { fmt.Fprintf(w, "# NextGC = %d\n", s.NextGC) fmt.Fprintf(w, "# PauseNs = %d\n", s.PauseNs) fmt.Fprintf(w, "# NumGC = %d\n", s.NumGC) - fmt.Fprintf(w, "# EnableGC = %v\n", s.EnableGC) fmt.Fprintf(w, "# DebugGC = %v\n", s.DebugGC) if tw != nil {