RFR: 8366980: TestTransparentHugePagesHeap.java fails when run with -UseCompressedOops [v2]

Thomas Schatzl tschatzl at openjdk.org
Tue Sep 9 06:11:10 UTC 2025


On Mon, 8 Sep 2025 13:12:46 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> The new test TestTransparentHugePagesHeap.java added in [JDK-8366434](https://bugs.openjdk.org/browse/JDK-8366434) fails when run with -UseCompressedOops.
>> 
>> The reason for this is that the address printed as the start of the heap in the pagesize logging is not the start of the mapping. So we fail to find the mapping when scanning the SMAPS file.
>> 
>> There reason why this happens is that Linux has merged the memory area for the heap with some other memory. Sometimes it is the marking bitmaps and sometimes it's just malloc that mapped some memory.
>> 
>> I propose that we change the test to find the smaps memory area that contains the start address of the heap and verify that that area is THP eligible.
>> 
>> I'm using BigInteger to represent the parsed addresses to skip having to deal with negative values in longs.
>> 
>> Tested locally with the reproducer. I'm also testing with tier1 and the tier that found this issue.
>> 
>> The fix is localized in TestTransparentHugePagesHeap.java so that it can easily be incorporated into a backport of JDK-8366434.
>
> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Early-return in contains check

Marked as reviewed by tschatzl (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/27143#pullrequestreview-3199468894


More information about the hotspot-gc-dev mailing list