RFR: 8355970: C2: Add command line option to print the compile phases
Manuel Hässig
mhaessig at openjdk.org
Wed May 14 15:00:30 UTC 2025
On Wed, 14 May 2025 14:08:40 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>>> > Thanks for working on the Manuel, looks very useful! Have you considered using the Unified Logging (UL) instead of creating a new JVM flag for this? We already have `-Xlog:jit+compilation` that seems related to this. You might print the compile phase information with e.g. `-Xlog:jit+compilation=trace`, or add a new UL tag if necessary.
>>> > We want to move towards using the UL framework in the JVM compiler components, now that the preparation work by @anton-seoane is completed.
>>>
>>> UL is definitely the long-term solution. But given that we have more levels with this new flag (-1 to 6) than UL provides (trace, info, etc.), how could we do it with UL?
>>
>> Good point, I guess we would have to remap the IGV print levels to the (fewer) UL logging levels. I think that would be OK, we probably do not need that many different print levels for IGV anyway. But I am also OK with adding a new JVM flag in the context of this RFE and revisiting it when migrating to UL.
>
>> > > Thanks for working on the Manuel, looks very useful! Have you considered using the Unified Logging (UL) instead of creating a new JVM flag for this? We already have `-Xlog:jit+compilation` that seems related to this. You might print the compile phase information with e.g. `-Xlog:jit+compilation=trace`, or add a new UL tag if necessary.
>> > > We want to move towards using the UL framework in the JVM compiler components, now that the preparation work by @anton-seoane is completed.
>> >
>> >
>> > UL is definitely the long-term solution. But given that we have more levels with this new flag (-1 to 6) than UL provides (trace, info, etc.), how could we do it with UL?
>>
>> Good point, I guess we would have to remap the IGV print levels to the (fewer) UL logging levels.
>
> That's true that these are probably too many levels. It would just sad when we want to (re-)add another level but we already used all UL levels. But maybe with UL, we want to have different tags or something like that.
>
>> But I am also OK with adding a new JVM flag in the context of this RFE and revisiting it when migrating to UL.
>
> I agree with that.
Thank you for the review and the suggestions @chhagedorn.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25183#issuecomment-2880561555
More information about the hotspot-compiler-dev
mailing list