8310974: NMT: Arena diffs miss the scale

Backport-of: 46e4ee1e80
This commit is contained in:
Daniel Hu
2025-06-27 17:52:44 +00:00
committed by Vitaly Provodin
parent 424288cdef
commit d004fd5d36

View File

@@ -516,8 +516,9 @@ void MemSummaryDiffReporter::print_arena_diff(size_t current_amount, size_t curr
const char* scale = current_scale();
outputStream* out = output();
out->print("arena=" SIZE_FORMAT "%s", amount_in_current_scale(current_amount), scale);
if (diff_in_current_scale(current_amount, early_amount) != 0) {
out->print(" " INT64_PLUS_FORMAT "d", diff_in_current_scale(current_amount, early_amount));
int64_t amount_diff = diff_in_current_scale(current_amount, early_amount);
if (amount_diff != 0) {
out->print(" " INT64_PLUS_FORMAT "%s", amount_diff, scale);
}
out->print(" #" SIZE_FORMAT "", current_count);