RFR: Rename UINT64_FORMAT_HEX_W to UINT64_FORMAT_X_W

Aleksey Shipilev shade at redhat.com
Fri Nov 30 09:12:46 UTC 2018


Following up on more Shenandoah reviews, make our new macro symmetrical to UINT64_FORMAT_X:

diff -r 2fff3e3b8015 src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp  Thu Nov 29 15:12:20 2018 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp  Fri Nov 30 10:09:40 2018 +0100
@@ -435,11 +435,11 @@
   st->print("|T " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_tlab_allocs()),
proper_unit_for_byte_size(get_tlab_allocs()));
   st->print("|G " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_gclab_allocs()),
proper_unit_for_byte_size(get_gclab_allocs()));
   st->print("|S " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_shared_allocs()),
proper_unit_for_byte_size(get_shared_allocs()));
   st->print("|L " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_live_data_bytes()),
proper_unit_for_byte_size(get_live_data_bytes()));
   st->print("|CP " SIZE_FORMAT_W(3), _critical_pins);
-  st->print("|SN " UINT64_FORMAT_HEX_W(12) ", " UINT64_FORMAT_HEX_W(8) ", " UINT64_FORMAT_HEX_W(8)
", " UINT64_FORMAT_HEX_W(8),
+  st->print("|SN " UINT64_FORMAT_X_W(12) ", " UINT64_FORMAT_X_W(8) ", " UINT64_FORMAT_X_W(8) ", "
UINT64_FORMAT_X_W(8),
             seqnum_first_alloc_mutator(), seqnum_last_alloc_mutator(),
             seqnum_first_alloc_gc(), seqnum_last_alloc_gc());
   st->cr();
 }

diff -r 2fff3e3b8015 src/hotspot/share/utilities/globalDefinitions.hpp
--- a/src/hotspot/share/utilities/globalDefinitions.hpp Thu Nov 29 15:12:20 2018 +0100
+++ b/src/hotspot/share/utilities/globalDefinitions.hpp Fri Nov 30 10:09:40 2018 +0100
@@ -65,13 +65,13 @@

 // Format 64-bit quantities.
 #define INT64_FORMAT           "%" PRId64
 #define UINT64_FORMAT          "%" PRIu64
 #define UINT64_FORMAT_X        "%" PRIx64
-#define UINT64_FORMAT_HEX_W(width) "%" #width PRIx64
 #define INT64_FORMAT_W(width)  "%" #width PRId64
 #define UINT64_FORMAT_W(width) "%" #width PRIu64
+#define UINT64_FORMAT_X_W(width) "%" #width PRIx64

 #define PTR64_FORMAT           "0x%016" PRIx64

 // Format jlong, if necessary
 #ifndef JLONG_FORMAT


Testing: tier1_gc_shenandoah

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list