Skip to content

Commit bb8db71

Browse files
committed
8318089: Class space not marked as such with NMT when CDS is off
Backport-of: c0e154c876e586660b36af6441cd178bc8ebab89
1 parent 6e21766 commit bb8db71

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
@@ -567,12 +567,6 @@ void Metaspace::initialize_class_space(ReservedSpace rs) {
567567
"wrong alignment");
568568

569569
MetaspaceContext::initialize_class_space_context(rs);
570-
571-
// This does currently not work because rs may be the result of a split
572-
// operation and NMT seems not to be able to handle splits.
573-
// Will be fixed with JDK-8243535.
574-
// MemTracker::record_virtual_memory_type((address)rs.base(), mtClass);
575-
576570
}
577571

578572
// Returns true if class space has been setup (initialize_class_space).
@@ -837,6 +831,9 @@ void Metaspace::global_initialize() {
837831
CompressedClassSpaceSize));
838832
}
839833

834+
// Mark class space as such
835+
MemTracker::record_virtual_memory_type((address)rs.base(), mtClass);
836+
840837
// Initialize space
841838
Metaspace::initialize_class_space(rs);
842839

0 commit comments

Comments
 (0)