mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: clean the output of GOSSAFUNC
Since we print almost everything to ssa.html in the GOSSAFUNC mode, there is a need to stop spamming stdout when user just wants to see ssa.html. This changes cleans output of the GOSSAFUNC debug mode. To enable the dump of the debug data to stdout, one must put suffix + after the function name like that: GOSSAFUNC=Foo+ Otherwise gc will not print the IR and ASM to stdout after each phase. AST IR is still sent to stdout because it is not included into ssa.html. It will be fixed in a separate change. The change adds printing out the full path to the ssa.html file. Updates #25942 Change-Id: I711e145e05f0443c7df5459ca528dced273a62ee Reviewed-on: https://go-review.googlesource.com/126603 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
eeb8aebed6
commit
c35069d642
4 changed files with 53 additions and 42 deletions
|
|
@ -42,7 +42,9 @@ func Compile(f *Func) {
|
|||
}()
|
||||
|
||||
// Run all the passes
|
||||
printFunc(f)
|
||||
if f.Log() {
|
||||
printFunc(f)
|
||||
}
|
||||
f.HTMLWriter.WriteFunc("start", "start", f)
|
||||
if BuildDump != "" && BuildDump == f.Name {
|
||||
f.dumpFile("build")
|
||||
|
|
@ -84,8 +86,10 @@ func Compile(f *Func) {
|
|||
stats = fmt.Sprintf("[%d ns]", time)
|
||||
}
|
||||
|
||||
f.Logf(" pass %s end %s\n", p.name, stats)
|
||||
printFunc(f)
|
||||
if f.Log() {
|
||||
f.Logf(" pass %s end %s\n", p.name, stats)
|
||||
printFunc(f)
|
||||
}
|
||||
f.HTMLWriter.WriteFunc(phaseName, fmt.Sprintf("%s <span class=\"stats\">%s</span>", phaseName, stats), f)
|
||||
}
|
||||
if p.time || p.mem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue