RFR: 8371789: C2: More explicit dump results for TypePtr
Quan Anh Mai
qamai at openjdk.org
Thu Nov 13 15:33:34 UTC 2025
On Thu, 13 Nov 2025 12:45:23 GMT, Christian Hagedorn <chagedorn 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.
>
> That looks like a nice readability improvement! Can you show some before vs. after output to summarize your changes?
@chhagedorn Yes, for example:
A byte array:
Before:
byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):exact *
After:
aryptr:byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):BotPTR:exact,iid=bot
A `j.l.Object`:
Before:
narrowoop: java/lang/Object *
After:
narrowoop: instptr:java/lang/Object:BotPTR+0,iid=bot
A pointer to the klass of `Object[]`:
Before:
precise [java/lang/Object: 0x00007011e800b840 * (java/lang/Cloneable,java/io/Serializable): :Constant:exact *
After:
aryklassptr:[instklassptr:java/lang/Object:NotNull+0 (java/lang/Cloneable,java/io/Serializable):Constant+0
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28292#issuecomment-3528364010
More information about the hotspot-compiler-dev
mailing list