ioilinux /jdk2/lee/open/test/hotspot/jtreg/runtime/cds/appcds$ hg diff diff -r 8ada048df69d src/hotspot/share/memory/heapShared.cpp --- a/src/hotspot/share/memory/heapShared.cpp Sun Aug 09 20:56:04 2020 -0700 +++ b/src/hotspot/share/memory/heapShared.cpp Sun Aug 09 21:08:37 2020 -0700 @@ -1051,15 +1051,23 @@ FindEmbeddedNonNullPointers finder((narrowOop*)p, &oopmap); int num_objs = 0; + size_t total_bytes = 0; + size_t noptr_bytes = 0; while (p < end) { + int num_non_null_oops = finder.num_total_oops() - finder.num_null_oops(); oop o = (oop)p; o->oop_iterate(&finder); p += o->size(); ++ num_objs; + total_bytes += o->size() * BytesPerWord; + if (num_non_null_oops == finder.num_total_oops() - finder.num_null_oops()) { + // There was no embedded non-null oops in this object + noptr_bytes += o->size() * BytesPerWord; + } } - log_info(cds, heap)("calculate_oopmap: objects = %6d, embedded oops = %7d, nulls = %7d", - num_objs, finder.num_total_oops(), finder.num_null_oops()); + log_info(cds, heap)("calculate_oopmap: objects = %6d (%d bytes, %d bytes don't need marking), embedded oops = %7d, nulls = %7d", + num_objs, (int)total_bytes, (int)noptr_bytes, finder.num_total_oops(), finder.num_null_oops()); return oopmap; }