Shopify / seafoam

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

Seafoam won't render phases nested under a group #42

Open nirvdrum opened 2 years ago

nirvdrum commented 2 years ago

Capturing compiled methods from Graal includes a phase named "Before Inline" nested under "Call Tree" for any of the TruffleIR methods. seafoam ... list includes them in its output:

TruffleHotSpotCompilation-7241[Symbol#to_s].bgv:0  TruffleIR::Symbol#to_s()/Call Tree/Before Inline
TruffleHotSpotCompilation-7241[Symbol#to_s].bgv:1  TruffleIR::Symbol#to_s()/After phase org.graalvm.compiler.truffle.compiler.phases.inlining.AgnosticInliningPhase
TruffleHotSpotCompilation-7241[Symbol#to_s].bgv:2  TruffleIR::Symbol#to_s()/After Partial Evaluation
...

However, seafoam render for that phase always generates an empty graph:

digraph G {
  graph [bgcolor="white"];
}

I haven't looked into Seafoam's internals to see what's going on, so my suggestion of the issue affecting phases nested under groups may be incorrect. This is the only phase I've seen nested so far so I can't verify with others.

chrisseaton commented 2 years ago

We should

nirvdrum commented 3 months ago

I just spot-checked Seafoam 0.16 with TruffleRuby 24.1.0-dev JVM CE and didn't see any empty graphs. But, adding a warning when rendering an empty graph would be useful. We could then automate processing of all the example graph phases to see if we run into a problem.