@@ -1087,10 +1087,12 @@ log_debug(gc, verify)("RemSet"); rem_set()->verify(); } void GenCollectedHeap::print_on(outputStream* st) const { + assert_locked_or_safepoint(Heap_lock); + _young_gen->print_on(st); _old_gen->print_on(st); MetaspaceAux::print_on(st); }