RFR: 8345658: WB_NMTCommitMemory redundantly records an NMT tag

David Holmes dholmes at openjdk.org
Mon Dec 9 04:05:42 UTC 2024


On Fri, 6 Dec 2024 10:09:02 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> This functions is called after an previous calls to WB_NMTReserveMemory and WB_NMTAttemptReserveMemoryAt, which both already registered an NMT tag. So, explicitly recording an NMT tag for this memory is redundant and slightly confusing.
> 
> The HotSpot JVM code does not record NMT tags when committing memory (except in a special case on Windows when mapping file memory).
> 
> Tested with tier1-3.

This seems consistent with the conclusion in [JDK-8331539](https://bugs.openjdk.org/browse/JDK-8331539) that tags for commit/uncommit are optional and up to the callers. So in that sense it is up to the caller of `WB_NMTCommitMemory` to decide whether an explicit tag is necessary.

Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22601#pullrequestreview-2487674522


More information about the hotspot-dev mailing list