RFR: 8344247: Move objectWaiter field to VirtualThread instance

David Holmes dholmes at openjdk.org
Mon Nov 18 05:43:44 UTC 2024


On Thu, 14 Nov 2024 22:34:24 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

> Small follow-up change after JDK-8338383. This moves the `objectWaiter` field from the stackChunk to the VirtualThread instance. Only the top stackChunk uses this field so we could save some memory by just saving it in the virtual thread instance instead. Also, related methods `stackChunkOopDesc::current_pending_monitor` and `stackChunkOopDesc::current_waiting_monitor` are moved to the `java_lang_VirtualThread` class where they naturally belong, since these are the equivalent of the JavaThread methods but for an unmounted vthread.
> Tested by running mach5 tiers1-3.
> 
> Thanks,
> Patricio

LGTM!

Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22124#pullrequestreview-2441576476


More information about the hotspot-dev mailing list