--- old/src/hotspot/share/classfile/classLoaderStats.cpp 2019-12-03 19:36:41.000000000 -0800 +++ new/src/hotspot/share/classfile/classLoaderStats.cpp 2019-12-03 19:36:41.000000000 -0800 @@ -59,7 +59,7 @@ cls = *cls_ptr; } - if (!cld->is_unsafe_anonymous()) { + if (!cld->is_shortlived()) { cls->_cld = cld; } @@ -71,7 +71,7 @@ ClassStatsClosure csc; cld->classes_do(&csc); - if(cld->is_unsafe_anonymous()) { + if(cld->is_shortlived()) { cls->_anon_classes_count += csc._num_classes; } else { cls->_classes_count = csc._num_classes; @@ -80,7 +80,7 @@ ClassLoaderMetaspace* ms = cld->metaspace_or_null(); if (ms != NULL) { - if(cld->is_unsafe_anonymous()) { + if(cld->is_shortlived()) { cls->_anon_chunk_sz += ms->allocated_chunks_bytes(); cls->_anon_block_sz += ms->allocated_blocks_bytes(); } else {