> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/32254/files
  - new: https://git.openjdk.org/jdk/pull/32254/files/9aa4b2f4..802fffc2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=32254&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32254&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/32254.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/32254/head:pull/32254

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

Reply via email to