--- old/src/share/vm/memory/metaspace.cpp 2018-01-24 01:41:51.171816261 -0800 +++ new/src/share/vm/memory/metaspace.cpp 2018-01-24 01:41:51.071807158 -0800 @@ -3098,13 +3098,24 @@ initialize_class_space(metaspace_rs); if (PrintCompressedOopsMode || (PrintMiscellaneous && Verbose)) { - gclog_or_tty->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: " SIZE_FORMAT, - Universe::narrow_klass_base(), Universe::narrow_klass_shift()); - gclog_or_tty->print_cr("Compressed class space size: " SIZE_FORMAT " Address: " PTR_FORMAT " Req Addr: " PTR_FORMAT, - compressed_class_space_size(), metaspace_rs.base(), requested_addr); + print_compressed_class_space(gclog_or_tty, requested_addr); } } +void Metaspace::print_compressed_class_space(outputStream* st, const char* requested_addr) { + st->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: %d", + p2i(Universe::narrow_klass_base()), Universe::narrow_klass_shift()); + if (_class_space_list != NULL) { + address base = (address)_class_space_list->current_virtual_space()->bottom(); + st->print("Compressed class space size: " SIZE_FORMAT " Address: " PTR_FORMAT, + compressed_class_space_size(), p2i(base)); + if (requested_addr != 0) { + st->print(" Req Addr: " PTR_FORMAT, p2i(requested_addr)); + } + st->cr(); + } + } + // For UseCompressedClassPointers the class space is reserved above the top of // the Java heap. The argument passed in is at the base of the compressed space. void Metaspace::initialize_class_space(ReservedSpace rs) {