From: Yury Smolsky Date: Thu, 7 Jun 2018 21:25:12 +0000 (+0300) Subject: cmd/compile: use expandable columns in ssa.html X-Git-Tag: go1.11beta1~111 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5eb98b3c3016c7dd10d71ee15bb6fc5d3128bec9;p=gostls13.git cmd/compile: use expandable columns in ssa.html Display just a few columns in ssa.html, other columns can be expanded by clicking on collapsed column. Use sans serif font for the text, slightly smaller font size for non program text. Fixes #25286 Change-Id: I1094695135401602d90b97b69e42f6dda05871a2 Reviewed-on: https://go-review.googlesource.com/117275 Run-TryBot: Yury Smolsky TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index a64d212233..3c15c8e555 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -4985,7 +4985,7 @@ func genssa(f *ssa.Func, pp *Progs) { } buf.WriteString("") buf.WriteString("") - f.HTMLWriter.WriteColumn("genssa", "ssa-prog", buf.String()) + f.HTMLWriter.WriteColumn("genssa", "genssa", "ssa-prog", buf.String()) // pp.Text.Ctxt.LineHist.PrintFilenameOnly = saved } } diff --git a/src/cmd/compile/internal/ssa/compile.go b/src/cmd/compile/internal/ssa/compile.go index 4bd9ade479..c7797d79e9 100644 --- a/src/cmd/compile/internal/ssa/compile.go +++ b/src/cmd/compile/internal/ssa/compile.go @@ -43,7 +43,7 @@ func Compile(f *Func) { // Run all the passes printFunc(f) - f.HTMLWriter.WriteFunc("start", f) + f.HTMLWriter.WriteFunc("start", "start", f) if BuildDump != "" && BuildDump == f.Name { f.dumpFile("build") } @@ -86,7 +86,7 @@ func Compile(f *Func) { f.Logf(" pass %s end %s\n", p.name, stats) printFunc(f) - f.HTMLWriter.WriteFunc(fmt.Sprintf("after %s %s", phaseName, stats), f) + f.HTMLWriter.WriteFunc(phaseName, fmt.Sprintf("%s %s", phaseName, stats), f) } if p.time || p.mem { // Surround timing information w/ enough context to allow comparisons. diff --git a/src/cmd/compile/internal/ssa/html.go b/src/cmd/compile/internal/ssa/html.go index 85d97ba497..d37e69977e 100644 --- a/src/cmd/compile/internal/ssa/html.go +++ b/src/cmd/compile/internal/ssa/html.go @@ -38,6 +38,11 @@ func (w *HTMLWriter) start(name string) {