The objectWaiter field should be moved from the stackChunk instance 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/current_waiting_monitor which read this field should be 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.
- links to
-
Commit(master) openjdk/jdk/f6366748
-
Review(master) openjdk/jdk/22124