Blame SOURCES/pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch

9fd28f
diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp
9fd28f
--- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp
9fd28f
+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp
045ef6
@@ -977,7 +977,7 @@
045ef6
     for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) {
045ef6
       CodeSection* sect = code_section(n);
045ef6
       if (!sect->is_allocated() || sect->is_empty())  continue;
045ef6
-      xtty->print_cr("<sect index='%d' size='" SIZE_FORMAT "' free='" SIZE_FORMAT "'/>",
045ef6
+      xtty->print_cr("<sect index='%d' size='" INTX_FORMAT "' free='" INTX_FORMAT "'/>",
045ef6
                      n, sect->limit() - sect->start(), sect->limit() - sect->end());
045ef6
     }
045ef6
     xtty->print_cr("</blob>");
9fd28f
diff --git openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp openjdk/hotspot/src/share/vm/code/codeCache.cpp
9fd28f
--- openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp
9fd28f
+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp
9fd28f
@@ -192,7 +192,7 @@
045ef6
     }
045ef6
     if (PrintCodeCacheExtension) {
045ef6
       ResourceMark rm;
045ef6
-      tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)",
045ef6
+      tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" INTX_FORMAT " bytes)",
045ef6
                     (intptr_t)_heap->low_boundary(), (intptr_t)_heap->high(),
045ef6
                     (address)_heap->high() - (address)_heap->low_boundary());
045ef6
     }
9fd28f
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
9fd28f
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
9fd28f
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
9fd28f
@@ -598,7 +598,7 @@
045ef6
     "   [Table]\n"
9fd28f
     "      [Memory Usage: " G1_STRDEDUP_BYTES_FORMAT_NS "]\n"
9fd28f
     "      [Size: " SIZE_FORMAT ", Min: " SIZE_FORMAT ", Max: " SIZE_FORMAT "]\n"
9fd28f
-    "      [Entries: " UINTX_FORMAT ", Load: " G1_STRDEDUP_PERCENT_FORMAT_NS ", Cached: " UINTX_FORMAT ", Added: " UINTX_FORMAT ", Removed: " UINTX_FORMAT "]\n"
9fd28f
+    "      [Entries: " UINTX_FORMAT ", Load: " G1_STRDEDUP_PERCENT_FORMAT_NS ", Cached: " SIZE_FORMAT ", Added: " UINTX_FORMAT ", Removed: " UINTX_FORMAT "]\n"
9fd28f
     "      [Resize Count: " UINTX_FORMAT ", Shrink Threshold: " UINTX_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT_NS "), Grow Threshold: " UINTX_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT_NS ")]\n"
9fd28f
     "      [Rehash Count: " UINTX_FORMAT ", Rehash Threshold: " UINTX_FORMAT ", Hash Seed: 0x%x]\n"
9fd28f
     "      [Age Threshold: " UINTX_FORMAT "]",
9fd28f
diff --git openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp
9fd28f
--- openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp
9fd28f
+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp
045ef6
@@ -57,7 +57,7 @@
045ef6
     gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: ");
045ef6
     gclog_or_tty->print_cr("  "
045ef6
                   "  rs.base(): " INTPTR_FORMAT
045ef6
-                  "  rs.size(): " INTPTR_FORMAT
045ef6
+                  "  rs.size(): " SIZE_FORMAT
045ef6
                   "  rs end(): " INTPTR_FORMAT,
045ef6
                   p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size()));
045ef6
     gclog_or_tty->print_cr("  "
9fd28f
diff --git openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
9fd28f
--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp
9fd28f
+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
9fd28f
@@ -1055,7 +1055,8 @@
9fd28f
     size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size);
9fd28f
     assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
9fd28f
     assert(FLAG_IS_ERGO(NewSize) && NewSize == expected,
9fd28f
-        err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize));
9fd28f
+        err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT,
9fd28f
+		expected, NewSize));
9fd28f
   }
9fd28f
 
9fd28f
 private:
9fd28f
diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
9fd28f
--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp
9fd28f
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp
9fd28f
@@ -1291,14 +1291,14 @@
045ef6
     }
045ef6
     if (PrintGCDetails && Verbose) {
045ef6
       // Too early to use gclog_or_tty
045ef6
-      tty->print_cr("CMS ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize);
045ef6
+      tty->print_cr("CMS ergo set MaxNewSize: " UINTX_FORMAT, MaxNewSize);
045ef6
     }
045ef6
 
045ef6
     // Code along this path potentially sets NewSize and OldSize
045ef6
     if (PrintGCDetails && Verbose) {
045ef6
       // Too early to use gclog_or_tty
045ef6
-      tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT
045ef6
-           " initial_heap_size:  " SIZE_FORMAT
045ef6
+      tty->print_cr("CMS set min_heap_size: " UINTX_FORMAT
045ef6
+           " initial_heap_size:  " UINTX_FORMAT
045ef6
            " max_heap: " SIZE_FORMAT,
045ef6
            min_heap_size(), InitialHeapSize, max_heap);
045ef6
     }
9fd28f
@@ -1314,7 +1314,7 @@
045ef6
         FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
045ef6
         if (PrintGCDetails && Verbose) {
045ef6
           // Too early to use gclog_or_tty
045ef6
-          tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
045ef6
+          tty->print_cr("CMS ergo set NewSize: " UINTX_FORMAT, NewSize);
045ef6
         }
045ef6
       }
045ef6
       // Unless explicitly requested otherwise, size old gen
9fd28f
@@ -1324,7 +1324,7 @@
045ef6
           FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize));
045ef6
           if (PrintGCDetails && Verbose) {
045ef6
             // Too early to use gclog_or_tty
045ef6
-            tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
045ef6
+            tty->print_cr("CMS ergo set OldSize: " UINTX_FORMAT, OldSize);
045ef6
           }
045ef6
         }
045ef6
       }
9fd28f
@@ -2043,7 +2043,7 @@
045ef6
 
045ef6
       if (PrintGCDetails && Verbose) {
045ef6
         // Cannot use gclog_or_tty yet.
045ef6
-        tty->print_cr("  Initial heap size " SIZE_FORMAT, (uintx)reasonable_initial);
045ef6
+        tty->print_cr("  Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial);
045ef6
       }
045ef6
       FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial);
045ef6
     }
9fd28f
@@ -2053,7 +2053,7 @@
045ef6
       set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize));
045ef6
       if (PrintGCDetails && Verbose) {
045ef6
         // Cannot use gclog_or_tty yet.
045ef6
-        tty->print_cr("  Minimum heap size " SIZE_FORMAT, min_heap_size());
045ef6
+        tty->print_cr("  Minimum heap size " UINTX_FORMAT, min_heap_size());
045ef6
       }
045ef6
     }
045ef6
   }
9fd28f
diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
9fd28f
--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp
9fd28f
+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
9fd28f
@@ -1389,12 +1389,21 @@
045ef6
 
045ef6
 #define INTPTR_FORMAT_W(width)   "%" #width PRIxPTR
045ef6
 
045ef6
+#if defined(S390) && !defined(_LP64)
045ef6
+#define SSIZE_FORMAT          "%z"   PRIdPTR
045ef6
+#define SIZE_FORMAT           "%z"   PRIuPTR
045ef6
+#define SIZE_FORMAT_HEX       "0x%z" PRIxPTR
045ef6
+#define SSIZE_FORMAT_W(width) "%"   #width "z" PRIdPTR
045ef6
+#define SIZE_FORMAT_W(width)  "%"   #width "z" PRIuPTR
045ef6
+#define SIZE_FORMAT_HEX_W(width) "0x%" #width "z" PRIxPTR
045ef6
+#else   // !S390
045ef6
 #define SSIZE_FORMAT          "%"   PRIdPTR
045ef6
 #define SIZE_FORMAT           "%"   PRIuPTR
045ef6
 #define SIZE_FORMAT_HEX       "0x%" PRIxPTR
045ef6
 #define SSIZE_FORMAT_W(width) "%"   #width PRIdPTR
045ef6
 #define SIZE_FORMAT_W(width)  "%"   #width PRIuPTR
045ef6
 #define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR
045ef6
+#endif  // S390
045ef6
 
045ef6
 #define INTX_FORMAT           "%" PRIdPTR
045ef6
 #define UINTX_FORMAT          "%" PRIuPTR