@@ -882,12 +882,12 @@ void SerialHeap::verify(VerifyOption option /* ignored */) {
882882}
883883
884884void SerialHeap::print_on (outputStream* st) const {
885- if (_young_gen != nullptr ) {
886- _young_gen-> print_on (st );
887- }
888- if (_old_gen != nullptr ) {
889- _old_gen->print_on (st);
890- }
885+ assert (_young_gen != nullptr , " precondition " );
886+ assert (_old_gen != nullptr , " precondition " );
887+
888+ _young_gen-> print_on (st);
889+ _old_gen->print_on (st);
890+
891891 MetaspaceUtils::print_on (st);
892892}
893893
@@ -908,7 +908,7 @@ void SerialHeap::print_heap_change(const PreGenGCValues& pre_gc_values) const {
908908 log_info (gc, heap)(HEAP_CHANGE_FORMAT" "
909909 HEAP_CHANGE_FORMAT" "
910910 HEAP_CHANGE_FORMAT,
911- HEAP_CHANGE_FORMAT_ARGS (def_new_gen->short_name (),
911+ HEAP_CHANGE_FORMAT_ARGS (def_new_gen->name (),
912912 pre_gc_values.young_gen_used (),
913913 pre_gc_values.young_gen_capacity (),
914914 def_new_gen->used (),
@@ -924,7 +924,7 @@ void SerialHeap::print_heap_change(const PreGenGCValues& pre_gc_values) const {
924924 def_new_gen->from ()->used (),
925925 def_new_gen->from ()->capacity ()));
926926 log_info (gc, heap)(HEAP_CHANGE_FORMAT,
927- HEAP_CHANGE_FORMAT_ARGS (old_gen ()->short_name (),
927+ HEAP_CHANGE_FORMAT_ARGS (old_gen ()->name (),
928928 pre_gc_values.old_gen_used (),
929929 pre_gc_values.old_gen_capacity (),
930930 old_gen ()->used (),
0 commit comments