RFR: 8344247: Move objectWaiter field to VirtualThread instance
Patricio Chilano Mateo
pchilanomate at openjdk.org
Thu Nov 14 22:51:18 UTC 2024
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
-------------
Commit messages:
- v1
Changes: https://git.openjdk.org/jdk/pull/22124/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22124&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8344247
Stats: 115 lines in 12 files changed: 39 ins; 62 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/22124.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22124/head:pull/22124
PR: https://git.openjdk.org/jdk/pull/22124
More information about the hotspot-dev
mailing list