RFR: JDK-8318089: Class space not marked as such with NMT when CDS is off
Thomas Stuefe
stuefe at openjdk.org
Wed Oct 18 08:29:30 UTC 2023
On Wed, 18 Oct 2023 06:40:18 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> If Xshare is off, we don't correctly register class space with NMT. We should do that.
>
> src/hotspot/share/memory/metaspace.cpp line 576:
>
>> 574: // operation and NMT seems not to be able to handle splits.
>> 575: // Will be fixed with JDK-8243535.
>> 576: // MemTracker::record_virtual_memory_type((address)rs.base(), mtClass);
>
> So why not just uncomment this line, instead of moving this to the caller?
There are two initialization paths: one is used when running with CDS, and metaspace is initialized together with it, and one is when running without CDS. This function is used for both. The CDS path is already covered, though, I only need to do the NMT registration for the non-CDS case. Otherwise, we register things doubly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16184#discussion_r1363446597
More information about the hotspot-runtime-dev
mailing list