On Tue, 11 Aug 2026 06:59:34 GMT, Sorna Sarathi N <[email protected]> wrote:
>> The test was using a fixed -XX:MaxMetaspaceSize=25m for all platforms. >> Investigation (via jcmd VM.metaspace) revealed that the higher limit is >> needed only on platforms where CDS is unavailable (e.g. AIX). Without CDS, >> all 3,340 classes are allocated in classic metaspace (~23.4 MB committed), >> whereas on Linux with CDS active, 1,364 core JDK classes are mapped from the >> shared archive into a separate "Shared Class Space" that does not count >> against -XX:MaxMetaspaceSize, keeping classic metaspace usage at ~13.6 MB. >> >> This was validated by running the test on Linux with -Xshare:off >> -XX:MaxMetaspaceSize=17m, which reproduces the same OOM as AIX. When running >> with 25m, the usage is very similar to AIX. >> >> This change splits the test into two variants based on CDS availability: >> >>> id=cds (@requires vm.cds): runs with -XX:MaxMetaspaceSize=17m >> id=nocds (@requires !vm.cds): runs with -XX:MaxMetaspaceSize=25m >> >> An explanatory comment is also included so the reasoning is clear to future >> readers. >> >> JBS Issue: [JDK-8336666](https://bugs.openjdk.org/browse/JDK-8336666) >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Sorna Sarathi N has updated the pull request incrementally with one > additional commit since the last revision: > > Update review comments test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java line 31: > 29: > 30: /* > 31: * @test id=nocds sorry, one more question. Is the intent here that, this part should run on AIX only ? or any platform with no cds, is also allowed ? I am not sure if anyone is doing this, but using `cds` still, is a choice, which can be disabled from the build itself, `--with-jvm-features=-cds`, in that case this test will be executed only all of platforms who have CDS disabled. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32254#discussion_r3756546814
