Shopify / seafoam

A tool for working with compiler graphs dumped by the GraalVM compiler
MIT License
126 stars 22 forks source link

Support for drawing basic blocks #24

Closed kethomassen closed 3 years ago

kethomassen commented 3 years ago

This change allows the visualisation (via a CLI flag) of basic blocks - if the information is available in the BGV file - as seen below:

graph

Still a WIP, but this has been useful for us and I wanted to see your thoughts? @chrisseaton

chrisseaton commented 3 years ago

Ah thank you so much! That's beautiful work and I really appreciate it!

Are you working with Java? I find I don't get useful basic block annotations out of Truffle which is why I've never tried it.

Are you happy with signing the CLA? Do you need any help to do that?

chrisseaton commented 3 years ago

The code seems good! I have help draft some tests.

kethomassen commented 3 years ago

Signed the CLA!

Yep, I'm working with Java - though this graph was generated by native-image, which seems to need an extra -H:+PrintGraphWithSchedule flag to add correct basic block information to the graph.

chrisseaton commented 3 years ago

which seems to need an extra -H:+PrintGraphWithSchedule

We could put that into the docs.

chrisseaton commented 3 years ago

Would you like me to make the suggested changes and get this merged?

kethomassen commented 3 years ago

I've made the changes mentioned above, but haven't yet had time to write any tests - you mentioned you drafted some tests above?

(Also, I assume #25 needs to be fixed first before merging too?)

chrisseaton commented 3 years ago

I have this working locally, so what I'm going to do is merge it now and then iterate on it show how to add tests and things.

chrisseaton commented 3 years ago

Thanks I released 0.8 so you can use that.

chrisseaton commented 3 years ago

Couldn't find you on Twitter, but thanks!

https://twitter.com/ChrisGSeaton/status/1411855399406473216

kethomassen commented 3 years ago

Thanks for merging :)