Skip to content

Commit c0e154c

Browse files
committed
8318089: Class space not marked as such with NMT when CDS is off
Reviewed-by: mli, dholmes
1 parent 24bc5bd commit c0e154c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/hotspot/share/memory/metaspace.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,6 @@ void Metaspace::initialize_class_space(ReservedSpace rs) {
569569
"wrong alignment");
570570

571571
MetaspaceContext::initialize_class_space_context(rs);
572-
573-
// This does currently not work because rs may be the result of a split
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);
577-
578572
}
579573

580574
// Returns true if class space has been setup (initialize_class_space).
@@ -804,6 +798,9 @@ void Metaspace::global_initialize() {
804798
CompressedClassSpaceSize));
805799
}
806800

801+
// Mark class space as such
802+
MemTracker::record_virtual_memory_type((address)rs.base(), mtClass);
803+
807804
// Initialize space
808805
Metaspace::initialize_class_space(rs);
809806

0 commit comments

Comments
 (0)