@@ -134,12 +134,6 @@ class oopDesc;
134134#define UINT64_FORMAT_W (width ) " %" #width PRIu64
135135#define UINT64_FORMAT_0 " %016" PRIx64
136136
137-
138- // Format integers which change size between 32- and 64-bit.
139- #define SIZE_FORMAT " %" PRIuPTR
140- #define SIZE_FORMAT_X " 0x%" PRIxPTR
141- #define SIZE_FORMAT_W (width ) " %" #width PRIuPTR
142-
143137// Format jlong, if necessary
144138#ifndef JLONG_FORMAT
145139#define JLONG_FORMAT INT64_FORMAT
@@ -373,15 +367,15 @@ inline T byte_size_in_proper_unit(T s) {
373367 }
374368}
375369
376- #define PROPERFMT SIZE_FORMAT " %s"
370+ #define PROPERFMT " %zu %s"
377371#define PROPERFMTARGS (s ) byte_size_in_proper_unit(s), proper_unit_for_byte_size(s)
378372
379373// Printing a range, with start and bytes given
380- #define RANGEFMT " [" PTR_FORMAT " - " PTR_FORMAT " ), (" SIZE_FORMAT " bytes)"
374+ #define RANGEFMT " [" PTR_FORMAT " - " PTR_FORMAT " ), (%zu bytes)"
381375#define RANGEFMTARGS (p1, size ) p2i(p1), p2i(p1 + size), size
382376
383377// Printing a range, with start and end given
384- #define RANGE2FMT " [" PTR_FORMAT " - " PTR_FORMAT " ), (" SIZE_FORMAT " bytes)"
378+ #define RANGE2FMT " [" PTR_FORMAT " - " PTR_FORMAT " ), (%zu bytes)"
385379#define RANGE2FMTARGS (p1, p2 ) p2i(p1), p2i(p2), ((uintptr_t )p2 - (uintptr_t )p1)
386380
387381inline const char * exact_unit_for_byte_size (size_t s) {
@@ -414,12 +408,12 @@ inline size_t byte_size_in_exact_unit(size_t s) {
414408 return s;
415409}
416410
417- #define EXACTFMT SIZE_FORMAT " %s"
411+ #define EXACTFMT " %zu %s"
418412#define EXACTFMTARGS (s ) byte_size_in_exact_unit(s), exact_unit_for_byte_size(s)
419413
420414// Memory size transition formatting.
421415
422- #define HEAP_CHANGE_FORMAT " %s: " SIZE_FORMAT " K( " SIZE_FORMAT " K )->" SIZE_FORMAT " K( " SIZE_FORMAT " K )"
416+ #define HEAP_CHANGE_FORMAT " %s: %zuK(%zuK )->%zuK(%zuK )"
423417
424418#define HEAP_CHANGE_FORMAT_ARGS (_name_, _prev_used_, _prev_capacity_, _used_, _capacity_ ) \
425419 (_name_), (_prev_used_) / K, (_prev_capacity_) / K, (_used_) / K, (_capacity_) / K
0 commit comments