Blame pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch

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