RFR: 8370254: Add VM_MEMORY_JAVA mmap tag to MacOS mmap calls [v10]

Axel Boldt-Christmas aboldtch at openjdk.org
Mon Nov 10 06:19:11 UTC 2025


On Sat, 8 Nov 2025 00:05:38 GMT, Nityanand Rai <duke at openjdk.org> wrote:

>> Add VM_MEMORY_JAVA tag to mmap calls in os_bsd.cpp for better memory tracking of java process on macOs
>
> Nityanand Rai has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove unncessary included

src/hotspot/os/bsd/os_bsd.hpp line 38:

> 36: // Shared constant for mmap file descriptor used across BSD OS implementations
> 37: static constexpr int bsd_mmap_fd =
> 38: #if defined(__APPLE__) && defined(VM_MAKE_TAG) && defined(VM_MEMORY_JAVA)

This did create some asymmetry now where this and the test is guarded, but the test utility which also requires `VM_MEMORY_JAVA` to be defined is not.

I might be better to use this condition once in this header file and introduce a new define which we use as the condition for the tagged memory related code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27868#discussion_r2508888148


More information about the hotspot-dev mailing list