RFR: 8366980: TestTransparentHugePagesHeap.java fails when run with -UseCompressedOops [v2]
Stefan Karlsson
stefank at openjdk.org
Mon Sep 8 13:12:46 UTC 2025
> 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
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27143/files
- new: https://git.openjdk.org/jdk/pull/27143/files/d399416d..97187a81
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27143&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27143&range=00-01
Stats: 31 lines in 1 file changed: 12 ins; 8 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/27143.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27143/head:pull/27143
PR: https://git.openjdk.org/jdk/pull/27143
More information about the hotspot-gc-dev
mailing list