golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.93k stars 17.52k forks source link

cmd/compile: use expandable columns in ssa.html? #25286

Closed josharian closed 6 years ago

josharian commented 6 years ago

As the number of SSA passes has grown, ssa.html has gotten wider and thus harder to navigate. I'd like to float the idea of having the initial display show just a few columns, with the others be expandable stubs (with names). As to the initial list of columns, maybe something like: start, after early deadcode, after opt, after lower, after late deadcode, after regalloc, genssa.

There's also the question of whether this can be reasonably implemented in standalone javascript, a question about which I know little.

Opinions?

cc @dr2chase @randall77 @cherrymui

randall77 commented 6 years ago

Yes, please. It is not possible that your javascript knowledge is less than mine.

ysmolski commented 6 years ago

@josharian is it okay when you reload ssa.html [in a browser] you would get to default state of collapsed columns?

josharian commented 6 years ago

Yes. It’d be nice to do some saved local state or query params, but as a first pass, I think always reverting to the default is fine. In the normal case I imagine the reader will be interested in one or two columns at most, so restoring state manually isn’t that big a deal.

gopherbot commented 6 years ago

Change https://golang.org/cl/117275 mentions this issue: cmd/compile: use expandable columns in ssa.html

ysmolski commented 6 years ago

In case if you want to give a feedback without downloading the patch above:

screen shot 2018-06-12 at 00 12 42 screen shot 2018-06-12 at 00 13 50

The vertical text (a column) can be expanded by clicking on it. If you want something else, just let me know.

I would be glad to help because I learned a thing or two about SSA while making the change. Also I would like to implement some of the TODOs buired in ssa.go regarding graphic representation (nodes->ssa?) or maybe just dumping the log from ssa to the ssa.html, so file can be shared as standalone piece. /cc @josharian

EDITED: typos and formatting