--- old/src/share/vm/memory/heapInspection.cpp 2016-02-05 08:24:08.741020974 +0100 +++ new/src/share/vm/memory/heapInspection.cpp 2016-02-05 08:24:08.637020969 +0100 @@ -226,9 +226,8 @@ return (*e1)->compare(*e1,*e2); } -KlassInfoHisto::KlassInfoHisto(KlassInfoTable* cit, const char* title) : - _cit(cit), - _title(title) { +KlassInfoHisto::KlassInfoHisto(KlassInfoTable* cit) : + _cit(cit) { _elements = new (ResourceObj::C_HEAP, mtInternal) GrowableArray(_histo_initial_size, true); } @@ -648,7 +647,8 @@ if (print_stats) { print_class_stats(st, csv_format, columns); } else { - st->print_cr("%s",title()); + st->print_cr(" num #instances #bytes class name"); + st->print_cr("----------------------------------------------"); print_elements(st); } } @@ -729,10 +729,7 @@ } // Sort and print klass instance info - const char *title = "\n" - " num #instances #bytes class name\n" - "----------------------------------------------"; - KlassInfoHisto histo(&cit, title); + KlassInfoHisto histo(&cit); HistoClosure hc(&histo); cit.iterate(&hc);