RFR: 8255414: Ensure OS functions always report to NMT

Thomas Stuefe stuefe at openjdk.org
Mon Mar 6 14:02:26 UTC 2023


The message from this sender included one or more files
which could not be scanned for virus detection; do not
open these files unless you are certain of the sender's intent.

----------------------------------------------------------------------
On Thu, 2 Mar 2023 14:05:14 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Hi,
> 
> This PR attempts to enforce the convention that:
> 
> 1. Public `os` functions report to NMT
> 2. `pd_` prefixed functions do not report to NMT
> 3. Public `os` functions call into `pd_`-prefixed functions to do the actual work.
> 
> This is a convention that has been only partially enforced, leading to some difficulties. For example, it's easy for double-accounting to NMT can occur if it's not clear what the `pd_`-prefixed functions do and do not do.

No time atm to review, but I like the direction of this patch. This has been inconsistent for a long time and occasionally tricky to get right.

I think NMT-hooking functions are few enough that the rule "os::xxx calls NMT, then does platform stuff" is enforceable.

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

PR: https://git.openjdk.org/jdk/pull/12832


More information about the hotspot-runtime-dev mailing list