RFR: 8355372: GenShen: Test gc/shenandoah/generational/TestOldGrowthTriggers.java fails with UseCompactObjectHeaders enabled
Y. Srinivas Ramakrishna
ysr at openjdk.org
Fri Apr 25 23:50:51 UTC 2025
On Fri, 25 Apr 2025 20:40:09 GMT, William Kemper <wkemper at openjdk.org> wrote:
> Add a test case for `-XX:+UseCompactObjectHeaders`, increase pressure on old generation. I ran the test (which includes a compact object headers case now) fifty times without failure.
Looks fine but left some thoughts, although you probably don't want to change anything if this setting is working to induce the behavior you want to test.
A whitebox test may be better in the future rather than having to tweak test settings to induce the right behavior to trigger old growth.
test/hotspot/jtreg/gc/shenandoah/generational/TestOldGrowthTriggers.java line 60:
> 58: int replaceIndex = r.nextInt(ArraySize);
> 59: int deriveIndex = r.nextInt(ArraySize);
> 60: switch (i & 0x3) {
...otherwise could you just do (i & 0x1) here and change cases 2 & 3 to cases 0 & 1?
test/hotspot/jtreg/gc/shenandoah/generational/TestOldGrowthTriggers.java line 68:
> 66: // 50% chance of creating garbage
> 67: array[replaceIndex] = array[replaceIndex].min(array[deriveIndex]);
> 68: break;
Could you have left this in place & reduced the heap size of the UseCompactHeaders test to half the current setting to induce the trigger?
-------------
Marked as reviewed by ysr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24888#pullrequestreview-2795532213
PR Review Comment: https://git.openjdk.org/jdk/pull/24888#discussion_r2061035944
PR Review Comment: https://git.openjdk.org/jdk/pull/24888#discussion_r2061034174
More information about the hotspot-gc-dev
mailing list