Integrated: 8366980: TestTransparentHugePagesHeap.java fails when run with -UseCompressedOops
Stefan Karlsson
stefank at openjdk.org
Wed Sep 10 11:58:47 UTC 2025
On Mon, 8 Sep 2025 12:34:33 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.
This pull request has now been integrated.
Changeset: 703d930e
Author: Stefan Karlsson <stefank at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/703d930e4d52a6f9741cf9affee8caade550e67b
Stats: 56 lines in 1 file changed: 31 ins; 2 del; 23 mod
8366980: TestTransparentHugePagesHeap.java fails when run with -UseCompressedOops
Reviewed-by: aboldtch, tschatzl
-------------
PR: https://git.openjdk.org/jdk/pull/27143
More information about the hotspot-gc-dev
mailing list