RFR: 8324514: ClassLoaderData::print_on should print address of class loader [v4]
Coleen Phillimore
coleenp at openjdk.org
Tue Jan 23 18:19:26 UTC 2024
On Tue, 23 Jan 2024 15:22:40 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> This looks like a simple diagnostic regression from [JDK-8201556](https://bugs.openjdk.org/browse/JDK-8201556). Instead of printing the address of the `OopHandle` slot, we really want to print the address of the classloader that handle holds. That was not intentional, right, @coleenp?
>>
>> I think we can `peek()` into handle, but the whole reason for [JDK-8201556](https://bugs.openjdk.org/browse/JDK-8201556) seems to avoid touching the classloader oops when unloading, and `peek()` would do a GC barrier on it. We could specialize for `!unloading` path, but I think we still want to see what is in the handle. So, this PR introduces the "peek_raw" version that would compile straight to plain access, after the null check.
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert "peek_raw"
>
> This reverts commit dca07884ed6a07a0517764020fcc7d62bc7be31b.
Yes, this looks really good, plus with the <unloading, oop is bad> message describes why this code is special. Thank you!
-------------
Marked as reviewed by coleenp (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17534#pullrequestreview-1839544563
More information about the hotspot-runtime-dev
mailing list