RFR: 8281505: Add CompileCommand PrintIdealPhase [v2]

Vladimir Kozlov kvn at openjdk.java.net
Fri Feb 11 18:23:09 UTC 2022


On Fri, 11 Feb 2022 10:51:51 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:

>> 1. This patch adds the CompileCommand PrintIdealPhase. It allows to specify a list of compiler phases that will print the ideal IR.
>> 
>> -XX:CompileCommand=PrintIdealPhase,Class::method,MATCHING,FINAL_CODE"
>> 
>> The motivation for this is that during work with the IR framework I have found the need for printing specific phases, and the previously added PrintIdealLevel is forced to use levels that just prints to much. (I will remove PrintIdealLevel in a separate patch since it's not needed anymore.)
>> 
>> I have chosen not to add PrintIdealPhase as a VM flag, but keep it as CompileCommand/CompilerControl only.
>> 
>> 2. This patch also changes the print_ideal output to emit the start tag with the phase name instead of the description, so that the name in the CompileCommand matches with what ends up in the tag. That tag is a new addition since PrintIdealLevel, so no one is using it yet.
>> 
>> 3. This patch also removes an unused allocation in register_jfr_phasetype_serializer. 
>> 
>> Please review,
>> Nils Eliasson
>
> Nils Eliasson has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Updated copyright year
>  - Change list to hashset

Update is good.

Looks like `zero` and `minimal` builds failed with this change:

src/hotspot/share/compiler/compilerDirectives.cpp:388:20: error: 'PrintIdealPhaseIndex' was not declared in this scope
[19](https://github.com/neliasso/jdk/runs/5155280503?check_suite_focus=true#step:19:19)
  388 |     if (!_modified[PrintIdealPhaseIndex]) {
[20](https://github.com/neliasso/jdk/runs/5155280503?check_suite_focus=true#step:19:20)
      |                    ^~~~~~~~~~~~~~~~~~~~
 ```

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

Marked as reviewed by kvn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7392Changes requested by kvn (Reviewer).


More information about the hotspot-compiler-dev mailing list