RFR: 8281946: VM.native_memory should report size of shareable memory [v2]

Thomas Stuefe stuefe at openjdk.org
Tue Dec 6 06:56:51 UTC 2022


On Mon, 5 Dec 2022 17:05:53 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

> 
> The choice to use readonly over shareable was another suggestion by @iklam. Here is some rationale: "Other mmaped pages can be shareable if they are writable but has not been modified by the JVM process (ie copy-on-write pages)"

I still don't get it... @iklam ?

Writeable and shareable are orthogonal properties. You can have every permutation. And in the JDK we have:
- RO + shared: CDS ro segments, text segments, ...
- RW + shared: things like perfmem at least, but possibly other things too.
- RO + private: guard pages,  ...
- RW + private: normal memory.

Here, we want to tell the user if something is shared: if the memory footprint is shouldered by several processes or by this process alone. The user does not really care about writeability, that's incidental. Therefore I think we should name it sharable.

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

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


More information about the hotspot-runtime-dev mailing list