RFR: 8281505: Add CompileCommand PrintIdealPhase [v2]

Christian Hagedorn chagedorn at openjdk.java.net
Fri Feb 11 16:18:10 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

Nice work! That will make things easier (and better in terms of performance) for [JDK-8280378](https://bugs.openjdk.java.net/browse/JDK-8280378). Looks good to me, too.

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

Marked as reviewed by chagedorn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7392


More information about the hotspot-compiler-dev mailing list