8295993: use K instead of 1024 in a couple of hotspot outputs

Reviewed-by: lucy, dholmes
This commit is contained in:
Matthias Baesken 2022-10-31 09:09:43 +00:00
parent 9b9be88bca
commit 274ea1db5b
4 changed files with 12 additions and 13 deletions

View file

@ -876,8 +876,7 @@ void SymbolTable::print_histogram() {
_local_table->do_scan(Thread::current(), hi);
tty->print_cr("Symbol Table Histogram:");
tty->print_cr(" Total number of symbols " SIZE_FORMAT_W(7), hi.total_count);
tty->print_cr(" Total size in memory " SIZE_FORMAT_W(7) "K",
(hi.total_size * wordSize) / 1024);
tty->print_cr(" Total size in memory " SIZE_FORMAT_W(7) "K", (hi.total_size * wordSize) / K);
tty->print_cr(" Total counted " SIZE_FORMAT_W(7), _symbols_counted);
tty->print_cr(" Total removed " SIZE_FORMAT_W(7), _symbols_removed);
if (_symbols_counted > 0) {
@ -885,8 +884,8 @@ void SymbolTable::print_histogram() {
((float)_symbols_removed / _symbols_counted) * 100);
}
tty->print_cr(" Reference counts " SIZE_FORMAT_W(7), Symbol::_total_count);
tty->print_cr(" Symbol arena used " SIZE_FORMAT_W(7) "K", arena()->used() / 1024);
tty->print_cr(" Symbol arena size " SIZE_FORMAT_W(7) "K", arena()->size_in_bytes() / 1024);
tty->print_cr(" Symbol arena used " SIZE_FORMAT_W(7) "K", arena()->used() / K);
tty->print_cr(" Symbol arena size " SIZE_FORMAT_W(7) "K", arena()->size_in_bytes() / K);
tty->print_cr(" Total symbol length " SIZE_FORMAT_W(7), hi.total_length);
tty->print_cr(" Maximum symbol length " SIZE_FORMAT_W(7), hi.max_length);
tty->print_cr(" Average symbol length %7.2f", ((float)hi.total_length / hi.total_count));
@ -895,11 +894,11 @@ void SymbolTable::print_histogram() {
for (size_t i = 0; i < hi.results_length; i++) {
if (hi.counts[i] > 0) {
tty->print_cr(" " SIZE_FORMAT_W(6) " " SIZE_FORMAT_W(10) " " SIZE_FORMAT_W(10) "K",
i, hi.counts[i], (hi.sizes[i] * wordSize) / 1024);
i, hi.counts[i], (hi.sizes[i] * wordSize) / K);
}
}
tty->print_cr(" >=" SIZE_FORMAT_W(6) " " SIZE_FORMAT_W(10) " " SIZE_FORMAT_W(10) "K\n",
hi.results_length, hi.out_of_range_count, (hi.out_of_range_size*wordSize) / 1024);
hi.results_length, hi.out_of_range_count, (hi.out_of_range_size*wordSize) / K);
}
#endif // PRODUCT