RFR: 8344247: Move objectWaiter field to VirtualThread instance

Coleen Phillimore coleenp at openjdk.org
Mon Nov 18 17:58:42 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

This is a nice cleanup.

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

Marked as reviewed by coleenp (Reviewer).

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


More information about the serviceability-dev mailing list