@@ -474,9 +474,9 @@ void MemSummaryDiffReporter::print_malloc_diff(size_t current_amount, size_t cur
474
474
out->print (" type=%s" , NMTUtil::flag_to_name (flags));
475
475
}
476
476
477
- long amount_diff = diff_in_current_scale (current_amount, early_amount);
477
+ int64_t amount_diff = diff_in_current_scale (current_amount, early_amount);
478
478
if (amount_diff != 0 ) {
479
- out->print (" %+ld %s" , amount_diff, scale);
479
+ out->print (" " INT64_PLUS_FORMAT " %s" , amount_diff, scale);
480
480
}
481
481
if (current_count > 0 ) {
482
482
out->print (" #" SIZE_FORMAT " " , current_count);
@@ -493,7 +493,7 @@ void MemSummaryDiffReporter::print_arena_diff(size_t current_amount, size_t curr
493
493
outputStream* out = output ();
494
494
out->print (" arena=" SIZE_FORMAT " %s" , amount_in_current_scale (current_amount), scale);
495
495
if (diff_in_current_scale (current_amount, early_amount) != 0 ) {
496
- out->print (" %+ld " , diff_in_current_scale (current_amount, early_amount));
496
+ out->print (" " INT64_PLUS_FORMAT " d " , diff_in_current_scale (current_amount, early_amount));
497
497
}
498
498
499
499
out->print (" #" SIZE_FORMAT " " , current_count);
@@ -508,15 +508,15 @@ void MemSummaryDiffReporter::print_virtual_memory_diff(size_t current_reserved,
508
508
const char * scale = current_scale ();
509
509
outputStream* out = output ();
510
510
out->print (" reserved=" SIZE_FORMAT " %s" , amount_in_current_scale (current_reserved), scale);
511
- long reserved_diff = diff_in_current_scale (current_reserved, early_reserved);
511
+ int64_t reserved_diff = diff_in_current_scale (current_reserved, early_reserved);
512
512
if (reserved_diff != 0 ) {
513
- out->print (" %+ld %s" , reserved_diff, scale);
513
+ out->print (" " INT64_PLUS_FORMAT " %s" , reserved_diff, scale);
514
514
}
515
515
516
516
out->print (" , committed=" SIZE_FORMAT " %s" , amount_in_current_scale (current_committed), scale);
517
- long committed_diff = diff_in_current_scale (current_committed, early_committed);
517
+ int64_t committed_diff = diff_in_current_scale (current_committed, early_committed);
518
518
if (committed_diff != 0 ) {
519
- out->print (" %+ld %s" , committed_diff, scale);
519
+ out->print (" " INT64_PLUS_FORMAT " %s" , committed_diff, scale);
520
520
}
521
521
}
522
522
@@ -660,10 +660,10 @@ void MemSummaryDiffReporter::diff_summary_of_type(MEMFLAGS flag,
660
660
out->print (" %27s (tracking overhead=" SIZE_FORMAT " %s" , " " ,
661
661
amount_in_current_scale (_current_baseline.malloc_tracking_overhead ()), scale);
662
662
663
- long overhead_diff = diff_in_current_scale (_current_baseline.malloc_tracking_overhead (),
664
- _early_baseline.malloc_tracking_overhead ());
663
+ int64_t overhead_diff = diff_in_current_scale (_current_baseline.malloc_tracking_overhead (),
664
+ _early_baseline.malloc_tracking_overhead ());
665
665
if (overhead_diff != 0 ) {
666
- out->print (" %+ld %s" , overhead_diff, scale);
666
+ out->print (" " INT64_PLUS_FORMAT " %s" , overhead_diff, scale);
667
667
}
668
668
out->print_cr (" )" );
669
669
} else if (flag == mtClass) {
@@ -695,18 +695,18 @@ void MemSummaryDiffReporter::print_metaspace_diff(const char* header,
695
695
early_stats.committed ());
696
696
out->print_cr (" )" );
697
697
698
- long diff_used = diff_in_current_scale (current_stats.used (),
699
- early_stats.used ());
698
+ int64_t diff_used = diff_in_current_scale (current_stats.used (),
699
+ early_stats.used ());
700
700
701
701
size_t current_waste = current_stats.committed () - current_stats.used ();
702
702
size_t early_waste = early_stats.committed () - early_stats.used ();
703
- long diff_waste = diff_in_current_scale (current_waste, early_waste);
703
+ int64_t diff_waste = diff_in_current_scale (current_waste, early_waste);
704
704
705
705
// Diff used
706
706
out->print (" %27s ( used=" SIZE_FORMAT " %s" , " " ,
707
707
amount_in_current_scale (current_stats.used ()), scale);
708
708
if (diff_used != 0 ) {
709
- out->print (" %+ld %s" , diff_used, scale);
709
+ out->print (" " INT64_PLUS_FORMAT " %s" , diff_used, scale);
710
710
}
711
711
out->print_cr (" )" );
712
712
@@ -716,7 +716,7 @@ void MemSummaryDiffReporter::print_metaspace_diff(const char* header,
716
716
out->print (" %27s ( waste=" SIZE_FORMAT " %s =%2.2f%%" , " " ,
717
717
amount_in_current_scale (current_waste), scale, waste_percentage);
718
718
if (diff_waste != 0 ) {
719
- out->print (" %+ld %s" , diff_waste, scale);
719
+ out->print (" " INT64_PLUS_FORMAT " %s" , diff_waste, scale);
720
720
}
721
721
out->print_cr (" )" );
722
722
}
0 commit comments