Blame SOURCES/pr3593-s390-size_t_format_flags.patch

045ef6
diff -r cf43a852f486 src/share/vm/asm/codeBuffer.cpp
045ef6
--- openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp	Wed Jan 13 03:43:29 2016 +0000
045ef6
+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp	Wed Jan 13 05:30:26 2016 +0000
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>");
045ef6
diff -r cf43a852f486 src/share/vm/code/codeCache.cpp
045ef6
--- openjdk/hotspot/src/share/vm/code/codeCache.cpp	Wed Jan 13 03:43:29 2016 +0000
045ef6
+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp	Wed Jan 13 05:30:26 2016 +0000
045ef6
@@ -191,7 +191,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
     }
045ef6
diff -r cf43a852f486 src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
045ef6
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	Wed Jan 13 03:43:29 2016 +0000
045ef6
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	Wed Jan 13 05:30:26 2016 +0000
045ef6
@@ -556,7 +556,7 @@
045ef6
     "   [Table]\n"
045ef6
     "      [Memory Usage: "G1_STRDEDUP_BYTES_FORMAT_NS"]\n"
045ef6
     "      [Size: "SIZE_FORMAT", Min: "SIZE_FORMAT", Max: "SIZE_FORMAT"]\n"
045ef6
-    "      [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " UINTX_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n"
045ef6
+    "      [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " SIZE_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n"
045ef6
     "      [Resize Count: "UINTX_FORMAT", Shrink Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS"), Grow Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS")]\n"
045ef6
     "      [Rehash Count: "UINTX_FORMAT", Rehash Threshold: "UINTX_FORMAT", Hash Seed: 0x%x]\n"
045ef6
     "      [Age Threshold: "UINTX_FORMAT"]",
045ef6
diff -r cf43a852f486 src/share/vm/memory/blockOffsetTable.cpp
045ef6
--- openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp	Wed Jan 13 03:43:29 2016 +0000
045ef6
+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp	Wed Jan 13 05:30:26 2016 +0000
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("  "
045ef6
diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp
045ef6
--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jan 13 03:43:29 2016 +0000
045ef6
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jan 13 05:30:26 2016 +0000
045ef6
@@ -1285,14 +1285,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
     }
045ef6
@@ -1308,7 +1308,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
045ef6
@@ -1318,7 +1318,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
       }
045ef6
@@ -1834,7 +1834,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
     }
045ef6
@@ -1844,7 +1844,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
   }
045ef6
diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp
045ef6
--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Jan 13 03:43:29 2016 +0000
045ef6
+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Jan 13 05:30:26 2016 +0000
045ef6
@@ -1382,12 +1382,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
045ef6
diff -r 388e9d0905e6 src/share/vm/memory/collectorPolicy.cpp
045ef6
--- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	Mon Apr 11 11:33:18 2016 +0000
045ef6
+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	Tue Apr 12 04:12:50 2016 +0100
045ef6
@@ -1056,7 +1056,8 @@
045ef6
     size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size);
045ef6
     assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
045ef6
     assert(FLAG_IS_ERGO(NewSize) && NewSize == expected,
045ef6
-        err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize));
045ef6
+        err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT,
045ef6
+		expected, NewSize));
045ef6
   }
045ef6
 
045ef6
 private: