8318089: Class space not marked as such with NMT when CDS is off

Reviewed-by: mli, dholmes
This commit is contained in:
Thomas Stuefe 2023-10-19 06:25:53 +00:00
parent 24bc5bd104
commit c0e154c876

@ -569,12 +569,6 @@ void Metaspace::initialize_class_space(ReservedSpace rs) {
"wrong alignment");
MetaspaceContext::initialize_class_space_context(rs);
// This does currently not work because rs may be the result of a split
// operation and NMT seems not to be able to handle splits.
// Will be fixed with JDK-8243535.
// MemTracker::record_virtual_memory_type((address)rs.base(), mtClass);
}
// Returns true if class space has been setup (initialize_class_space).
@ -804,6 +798,9 @@ void Metaspace::global_initialize() {
CompressedClassSpaceSize));
}
// Mark class space as such
MemTracker::record_virtual_memory_type((address)rs.base(), mtClass);
// Initialize space
Metaspace::initialize_class_space(rs);