RFR: 8321225: [JVMCI] HotSpotResolvedObjectTypeImpl.isLeafClass shouldn't create strong references

Tom Rodriguez never at openjdk.org
Tue Dec 5 18:15:47 UTC 2023


On Mon, 4 Dec 2023 05:36:38 GMT, Tom Rodriguez <never at openjdk.org> wrote:

> Checking for leaf Klasses requires seeing if the subklass field is null.  As part of the fix for JVMCI support for ZGC, JDK-8299229, it was changed to call into the runtime which had the side effect of creating a strong reference to an the class.  Since it's only checking for non-null it's ok to just perform thread directly as was done prior to JDK-8299229.  This avoids causing class unloading problems.

Yes the possible negative answer just seems like a race that could end up happening either way depending when you compile.

Thanks for the reviews.  Testing was clean.

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

PR Comment: https://git.openjdk.org/jdk/pull/16943#issuecomment-1841347105


More information about the hotspot-compiler-dev mailing list