RFR: 8371789: C2: More explicit dump results for TypePtr

Christian Hagedorn chagedorn at openjdk.org
Thu Nov 20 12:56:20 UTC 2025


On Thu, 13 Nov 2025 11:50:46 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> This patch tries to clear up the dumped information of `TypePtr` and its subclasses. It makes it immediately clear the states of the `Type` object without us having to look into the implementation of `dump2`, for example, to know that the absence of `:NotNull` implies that it is a `BotPTR`.
> 
> Please take a look and kindly review, thanks a lot.

I think that is a good improvement and makes the output much clearer (especially to detect whether it's a klass pointer). I also like that we are now more explicit with previously hidden defaults. A concern could be that it's now too verbose. But personally, I don't think that it matter too much when debugging. And if we find that we are struggling with that, we could still come back and tighten the output again.

Once this is in Valhalla, we could do a similar clean-up there (there is already an RFE filed for that: [JDK-8332036](https://bugs.openjdk.org/browse/JDK-8332036)). If you are up for it, feel free to take this over as well :-)

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28292#pullrequestreview-3487725738


More information about the hotspot-compiler-dev mailing list