From f0324261341f078b48c41ed63a1a6f46dfe603d8 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Mon, 16 Jun 2014 16:31:30 -0400 Subject: [PATCH] go.tools/go/pointer: suppress logging by default LGTM=crawshaw R=crawshaw CC=golang-codereviews https://golang.org/cl/102490043 --- go/pointer/analysis.go | 2 +- go/pointer/hvn.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go/pointer/analysis.go b/go/pointer/analysis.go index cb423f4e..c2f5a962 100644 --- a/go/pointer/analysis.go +++ b/go/pointer/analysis.go @@ -31,7 +31,7 @@ const ( debugHVN = false // enable assertions in HVN debugHVNVerbose = false // enable extra HVN logging debugHVNCrossCheck = false // run solver with/without HVN and compare (caveats below) - debugTimers = true // show running time of each phase + debugTimers = false // show running time of each phase ) // object.flags bitmask values. diff --git a/go/pointer/hvn.go b/go/pointer/hvn.go index 1dd9049c..0e1c6b24 100644 --- a/go/pointer/hvn.go +++ b/go/pointer/hvn.go @@ -160,7 +160,6 @@ package pointer import ( "fmt" "io" - "log" "reflect" "code.google.com/p/go.tools/container/intsets" @@ -939,7 +938,9 @@ func (h *hvn) simplify() { } h.a.constraints = cc - log.Printf("#constraints: was %d, now %d\n", nbefore, len(h.a.constraints)) + if h.log != nil { + fmt.Fprintf(h.log, "#constraints: was %d, now %d\n", nbefore, len(h.a.constraints)) + } } // find returns the canonical onodeid for x.