]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make GOSSAHASH package-sensitive, also append to log files
authorDavid Chase <drchase@google.com>
Wed, 5 Aug 2020 14:26:57 +0000 (10:26 -0400)
committerDavid Chase <drchase@google.com>
Mon, 24 Aug 2020 02:38:18 +0000 (02:38 +0000)
commit4220d670844e15f78041a9fa7dea1c2a89a9b139
tree63ef87496e6de1c0f158785c4d07cee13f503d85
parentc0602603b20186228b4f89f265cb3f7665e06768
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>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/export_test.go
src/cmd/compile/internal/ssa/func.go