--- a/hotspot/src/share/vm/memory/heapInspection.cpp Thu Feb 04 23:39:27 2016 +0000
+++ b/hotspot/src/share/vm/memory/heapInspection.cpp Fri Feb 05 08:59:36 2016 +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<KlassInfoEntry*>(_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);