Skip to content

Commit d90d028

Browse files
Andreas SteinerTheRealMDoerr
Andreas Steiner
authored andcommittedAug 16, 2024
8318089: Class space not marked as such with NMT when CDS is off
Reviewed-by: stuefe Backport-of: c0e154c876e586660b36af6441cd178bc8ebab89
1 parent 5e0e2e3 commit d90d028

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎src/hotspot/share/memory/metaspace.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,6 @@ void Metaspace::initialize_class_space(ReservedSpace rs) {
566566
"wrong alignment");
567567

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

577571
// Returns true if class space has been setup (initialize_class_space).
@@ -840,6 +834,9 @@ void Metaspace::global_initialize() {
840834
CompressedClassSpaceSize));
841835
}
842836

837+
// Mark class space as such
838+
MemTracker::record_virtual_memory_type((address)rs.base(), mtClass);
839+
843840
// Initialize space
844841
Metaspace::initialize_class_space(rs);
845842

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Aug 16, 2024

@openjdk-notifier[bot]
Please sign in to comment.