diff options
author | David Chase <drchase@google.com> | 2020-08-05 10:26:57 -0400 |
---|---|---|
committer | David Chase <drchase@google.com> | 2020-08-24 02:38:18 +0000 |
commit | 4220d670844e15f78041a9fa7dea1c2a89a9b139 (patch) | |
tree | 63ef87496e6de1c0f158785c4d07cee13f503d85 /src/cmd/compile/internal/ssa/export_test.go | |
parent | c0602603b20186228b4f89f265cb3f7665e06768 (diff) | |
download | go-4220d670844e15f78041a9fa7dea1c2a89a9b139.tar.gz go-4220d670844e15f78041a9fa7dea1c2a89a9b139.zip |
cmd/compile: make GOSSAHASH package-sensitive, also append to log files
Turns out if your failure is in a function with a name like "Reset()"
there will be a lot of hits on the same hashcode. Adding package sensitivity
solves this problem.
In additionm, it turned out that in the case that a logfile was specified
for the GOSSAHASH logging, that it was opened in create mode, which meant
that multiple compiler invocations would reset the file to zero length.
Opening in append mode works better; the automated harness
(github.com/dr2chase/gossahash) takes care of truncating the file before use.
Change-Id: I5601bc280faa94cbd507d302448831849db6c842
Reviewed-on: https://go-review.googlesource.com/c/go/+/246937
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/export_test.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/export_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/export_test.go b/src/cmd/compile/internal/ssa/export_test.go index a94cce48a4..51665c60e2 100644 --- a/src/cmd/compile/internal/ssa/export_test.go +++ b/src/cmd/compile/internal/ssa/export_test.go @@ -146,6 +146,10 @@ func (d DummyFrontend) Fatalf(_ src.XPos, msg string, args ...interface{}) { d.t func (d DummyFrontend) Warnl(_ src.XPos, msg string, args ...interface{}) { d.t.Logf(msg, args...) } func (d DummyFrontend) Debug_checknil() bool { return false } +func (d DummyFrontend) MyImportPath() string { + return "my/import/path" +} + var dummyTypes Types func init() { |