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

Christian Hagedorn chagedorn 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.

Changes requested by chagedorn (Reviewer).

src/hotspot/share/opto/phasetype.hpp line 171:

> 169:         strncpy(_bad, *iter, len);
> 170:         _valid = false;
> 171:       } else if (PHASE_DEBUG == cpt) {

I don't think abusing the unused `PHASE_DEBUG` in this way is a good and clean approach. I'd rather add a new enum entry `PHASE_ALL` or something like that in `CompilerPhaseType` as you have proposed.

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

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


More information about the hotspot-compiler-dev mailing list