RFR: Format mismatch for {first|last}_alloc_seq_num()

Aleksey Shipilev shade at redhat.com
Mon Sep 11 14:16:20 UTC 2017


Trivial fix:  {first|last}_alloc_seq_num() are actually uint64_t, not size_t.

$ hg diff
diff -r 957389946d2c src/share/vm/gc/shenandoah/shenandoahConnectionMatrix.cpp
--- a/src/share/vm/gc/shenandoah/shenandoahConnectionMatrix.cpp	Mon Sep 11 15:08:31 2017 +0200
+++ b/src/share/vm/gc/shenandoah/shenandoahConnectionMatrix.cpp	Mon Sep 11 16:13:52 2017 +0200
@@ -80,7 +80,7 @@

       if (count > 0) {
         st->print("%8u, " SIZE_FORMAT_W(10) ", " SIZE_FORMAT_W(10) ", " SIZE_FORMAT_W(10) ", "
-          SIZE_FORMAT_W(8) ", " SIZE_FORMAT_W(8) ", %8u, {",
+          UINT64_FORMAT_W(8) ", " UINT64_FORMAT_W(8) ", %8u, {",
                 from_idx, r->get_live_data_bytes(), r->used(), r->garbage(),
                   r->first_alloc_seq_num(), r->last_alloc_seq_num(), count);
         for (uint to_idx = 0; to_idx < _stride; to_idx++) {
diff -r 957389946d2c src/share/vm/gc/shenandoah/shenandoahHeapRegion.cpp
--- a/src/share/vm/gc/shenandoah/shenandoahHeapRegion.cpp	Mon Sep 11 15:08:31 2017 +0200
+++ b/src/share/vm/gc/shenandoah/shenandoahHeapRegion.cpp	Mon Sep 11 16:13:52 2017 +0200
@@ -353,8 +353,8 @@
   st->print("|G %3d%%", (int) ((double) get_gclab_allocs() * 100 / capacity()));
   st->print("|S %3d%%", (int) ((double) get_shared_allocs() * 100 / capacity()));
   st->print("|L %3d%%", (int) ((double) get_live_data_bytes() * 100 / capacity()));
-  st->print("|FTS " SIZE_FORMAT_W(15), first_alloc_seq_num());
-  st->print("|LTS " SIZE_FORMAT_W(15), last_alloc_seq_num());
+  st->print("|FTS " UINT64_FORMAT_W(15), first_alloc_seq_num());
+  st->print("|LTS " UINT64_FORMAT_W(15), last_alloc_seq_num());
   if (is_root()) {
     st->print("|R");
   } else {

Testing: hotspot_fast_gc_shenandoah

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list