On Wed, 22 Jul 2026 16:20:36 GMT, Amit Kumar <[email protected]> wrote:
>> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use 4GB as alignment > > Thanks for fixing the alignment; > > I came up with a testcase: > https://github.com/offamitkumar/jdk/commit/7ab1dacc21a182eb20f835c78cdfbf0e08e94481, > feel free to modify it upto your liking. > > Status: > - 4TB cap, 4GB alignment : test passes > - 4TB cap, 16MB alignment : fails > - 256TB cap, 4GB alignment : fails (4TB cap is now expected) > > Fails with: > > java.lang.RuntimeException: 'reserve_between (range > [0x0000000100000000-0x0000040000000000), size 0x[0-9a-f]+, alignment > 0x100000000,' missing from stdout/stderr > at > jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:434) > at > S390ClassSpaceAihAlignment.testAihAlignment(S390ClassSpaceAihAlignment.java:68) > at S390ClassSpaceAihAlignment.main(S390ClassSpaceAihAlignment.java:83) > at > java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) > at java.base/java.lang.reflect.Method.invoke(Method.java:583) > at > com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:360) > at java.base/java.lang.Thread.run(Thread.java:1527) @offamitkumar thanks for the test, but this is almost what the CompressedCPUSpecificClassSpaceReservation.java test case was doing anyway. I adapted it to check for the alignment too, and also to double-check for the upper boundary in case of s390. We will need to adapt this test case anyway at some point, since it assumes class space reservation is the only caller for reserve_between, but I plan to use that API in a number of other places too, eg. for heap reservation. But thats a problem for another day.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/31990#issuecomment-5055319064
