On Tue, 11 Aug 2026 06:25:13 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: > > Minor Fix test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java line 54: > 52: */ > 53: > 54: // This test has two variants with different MaxMetaspaceSize values > depending on CDS availability. also maybe move this comment on top ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32254#discussion_r3755693719
