1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:24:46 -07:00

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 <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
Hitoshi Mitake 2016-01-13 23:06:27 +09:00 committed by Minux Ma
parent 4ab1793a78
commit 8c838192b8

View File

@ -485,7 +485,6 @@ func writeHeap(w io.Writer, debug int) error {
fmt.Fprintf(w, "# NextGC = %d\n", s.NextGC) fmt.Fprintf(w, "# NextGC = %d\n", s.NextGC)
fmt.Fprintf(w, "# PauseNs = %d\n", s.PauseNs) fmt.Fprintf(w, "# PauseNs = %d\n", s.PauseNs)
fmt.Fprintf(w, "# NumGC = %d\n", s.NumGC) fmt.Fprintf(w, "# NumGC = %d\n", s.NumGC)
fmt.Fprintf(w, "# EnableGC = %v\n", s.EnableGC)
fmt.Fprintf(w, "# DebugGC = %v\n", s.DebugGC) fmt.Fprintf(w, "# DebugGC = %v\n", s.DebugGC)
if tw != nil { if tw != nil {