]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: allow directory specification for GOSSAFUNC output
authorDavid Chase <drchase@google.com>
Mon, 31 Aug 2020 18:29:58 +0000 (14:29 -0400)
committerDavid Chase <drchase@google.com>
Thu, 1 Oct 2020 20:52:34 +0000 (20:52 +0000)
commitf4cbf3477f1456b4d28a7b74b31820ee60b7e6d1
tree1a78d5de195f50c6df96615e6d42d7159de215ba
parentc78c79f152dff010820a22e9a79cfffe48322914
cmd/compile: allow directory specification for GOSSAFUNC output

This was useful for debugging failures occurring during make.bash.
The added flush also ensures that any hints in the GOSSAFUNC output
are flushed before fatal exit.

The environment variable GOSSADIR specifies where the SSA html debugging
files should be placed.  To avoid collisions, each one is written into
the [package].[functionOrMethod].html, where [package] is the filepath
separator separated package name, function is the function name, and method
is either (*Type).Method, or Type.Method, as appropriate.  Directories
are created as necessary to make this work.

Change-Id: I420927426b618b633bb1ffc51cf0f223b8f6d49c
Reviewed-on: https://go-review.googlesource.com/c/go/+/252338
Trust: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/html.go