RFR: 8290401: Support dump all phases and print nodes in ascending order of index

Emanuel Peter epeter at openjdk.org
Wed Sep 21 15:01:06 UTC 2022


On Wed, 21 Sep 2022 04:23:34 GMT, Joshua Cao <duke at openjdk.org> wrote:

> * Sort nodes by index (`S` flag)
> * increase max node distance to maximum number of nodes
> * `DEBUG` phase for `-XX:CompileCommand=PrintIdealPhase` is currently unused. We propose to use `DEBUG` phase for printing all phases. Alternatively, we can add a new `ALL` phase. Seeking opinions from the community.
> 
> Thanks Xin Liu for working with me on this.

Updated `dump` with sorting makes sense, as you say in [JDK-8290401](https://bugs.openjdk.org/browse/JDK-8290401) this allows easier to take a diff.
Adding in the `tty->print_cr("AFTER: %s", phase_name);` is nice for human reader, and if there is an automatic tool that reads this it can hopefully easily be adapted.
I would recommend creating a new flag `PHASE_ALL`, this is more understandable.
`PHASE_DEBUG` is used in `igv_print_default` (for debugger, call this any time to take snapshot and send it to IGV for visualization) - I think it would be confusing to reuse this for something else.

-------------

PR: https://git.openjdk.org/jdk/pull/10371


More information about the hotspot-compiler-dev mailing list