Integrated: 8344247: Move objectWaiter field to VirtualThread instance

Patricio Chilano Mateo pchilanomate at openjdk.org
Mon Nov 18 20:51:47 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 pull request has now been integrated.

Changeset: f6366748
Author:    Patricio Chilano Mateo <pchilanomate at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f636674889f925d4feb9a8d2be811e66f9b3a0ac
Stats:     115 lines in 12 files changed: 39 ins; 62 del; 14 mod

8344247: Move objectWaiter field to VirtualThread instance

Reviewed-by: dholmes, coleenp

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

PR: https://git.openjdk.org/jdk/pull/22124


More information about the serviceability-dev mailing list