On Tue, 7 Oct 2025 13:02:10 GMT, Paul Hübner <[email protected]> wrote:

> Hi all,
> 
> This PR follows up on changes made in 
> [JDK-8368875](https://bugs.openjdk.org/browse/JDK-8368875). I updated the 
> documentation to reflect the new information gained.
> 
> Furthermore, the investigation described in the issue yielded that we _must_ 
> preserve the larval bit explicitly. I introduce a regression test. If we 
> change the mark word preservation condition to `return (!is_unlocked() || 
> !has_no_hash())` (i.e. what we had before), I have confirmed that we will 
> crash a debug VM via failed assertion. Note that ZGC does not require mark 
> word preservation. I've nonetheless decided to include it in case this 
> behaviour is introduced later.
> 
> Testing: tiers 1-3.

The comment looks good.

test/hotspot/jtreg/runtime/valhalla/inlinetypes/LarvalMarkWordTest.java line 91:

> 89:   }
> 90: 
> 91:   private static void stressTheGC() {

There's a WhiteBox FullGC that you can call that might be a reliable way of 
calling System.gc().

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

PR Review: 
https://git.openjdk.org/valhalla/pull/1666#pullrequestreview-3351870930
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1666#discussion_r2441130180

Reply via email to