8076071: parallelScavenge: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
authordavid
Fri, 27 Mar 2015 15:24:49 +0100
changeset 29798 451c73fdf690
parent 29797 4d360e3ddebf
child 29799 3ad47a56094a
8076071: parallelScavenge: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files Reviewed-by: brutisso, mgerdin, stefank
hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -32,8 +32,6 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/orderAccess.inline.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 //
 // GCTask
 //
@@ -101,7 +99,7 @@
 NOT_PRODUCT(
 void GCTask::print(const char* message) const {
   tty->print(INTPTR_FORMAT " <- " INTPTR_FORMAT "(%u) -> " INTPTR_FORMAT,
-             newer(), this, affinity(), older());
+             p2i(newer()), p2i(this), affinity(), p2i(older()));
 }
 )
 
@@ -113,7 +111,7 @@
   GCTaskQueue* result = new GCTaskQueue(false);
   if (TraceGCTaskQueue) {
     tty->print_cr("GCTaskQueue::create()"
-                  " returns " INTPTR_FORMAT, result);
+                  " returns " INTPTR_FORMAT, p2i(result));
   }
   return result;
 }
@@ -123,7 +121,7 @@
   if (TraceGCTaskQueue) {
     tty->print_cr("GCTaskQueue::create_on_c_heap()"
                   " returns " INTPTR_FORMAT,
-                  result);
+                  p2i(result));
   }
   return result;
 }
@@ -134,7 +132,7 @@
   if (TraceGCTaskQueue) {
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " GCTaskQueue::GCTaskQueue() constructor",
-                  this);
+                  p2i(this));
   }
 }
 
@@ -147,7 +145,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " GCTaskQueue::destroy()"
                   "  is_c_heap_obj:  %s",
-                  that,
+                  p2i(that),
                   that->is_c_heap_obj() ? "true" : "false");
   }
   // That instance may have been allocated as a CHeapObj,
@@ -173,7 +171,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " GCTaskQueue::enqueue(task: "
                   INTPTR_FORMAT ")",
-                  this, task);
+                  p2i(this), p2i(task));
     print("before:");
   }
   assert(task != NULL, "shouldn't have null task");
@@ -200,7 +198,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " GCTaskQueue::enqueue(list: "
                   INTPTR_FORMAT ")",
-                  this, list);
+                  p2i(this), p2i(list));
     print("before:");
     list->print("list:");
   }
@@ -234,14 +232,14 @@
 GCTask* GCTaskQueue::dequeue() {
   if (TraceGCTaskQueue) {
     tty->print_cr("[" INTPTR_FORMAT "]"
-                  " GCTaskQueue::dequeue()", this);
+                  " GCTaskQueue::dequeue()", p2i(this));
     print("before:");
   }
   assert(!is_empty(), "shouldn't dequeue from empty list");
   GCTask* result = remove();
   assert(result != NULL, "shouldn't have NULL task");
   if (TraceGCTaskQueue) {
-    tty->print_cr("    return: " INTPTR_FORMAT, result);
+    tty->print_cr("    return: " INTPTR_FORMAT, p2i(result));
     print("after:");
   }
   return result;
@@ -251,7 +249,7 @@
 GCTask* GCTaskQueue::dequeue(uint affinity) {
   if (TraceGCTaskQueue) {
     tty->print_cr("[" INTPTR_FORMAT "]"
-                  " GCTaskQueue::dequeue(%u)", this, affinity);
+                  " GCTaskQueue::dequeue(%u)", p2i(this), affinity);
     print("before:");
   }
   assert(!is_empty(), "shouldn't dequeue from empty list");
@@ -275,7 +273,7 @@
     result = remove();
   }
   if (TraceGCTaskQueue) {
-    tty->print_cr("    return: " INTPTR_FORMAT, result);
+    tty->print_cr("    return: " INTPTR_FORMAT, p2i(result));
     print("after:");
   }
   return result;
@@ -345,7 +343,7 @@
                 "  remove_end: " INTPTR_FORMAT
                 "  length:       %d"
                 "  %s",
-                this, insert_end(), remove_end(), length(), message);
+                p2i(this), p2i(insert_end()), p2i(remove_end()), length(), message);
   uint count = 0;
   for (GCTask* element = insert_end();
        element != NULL;
@@ -486,7 +484,7 @@
 
   assert(!all_workers_active() || active_workers() == ParallelGCThreads,
          err_msg("all_workers_active() is  incorrect: "
-                 "active %d  ParallelGCThreads %d", active_workers(),
+                 "active %d  ParallelGCThreads " UINTX_FORMAT, active_workers(),
                  ParallelGCThreads));
   if (TraceDynamicGCThreads) {
     gclog_or_tty->print_cr("GCTaskManager::set_active_gang(): "
@@ -598,7 +596,7 @@
   MutexLockerEx ml(monitor(), Mutex::_no_safepoint_check_flag);
   if (TraceGCTaskManager) {
     tty->print_cr("GCTaskManager::add_task(" INTPTR_FORMAT " [%s])",
-                  task, GCTask::Kind::to_string(task->kind()));
+                  p2i(task), GCTask::Kind::to_string(task->kind()));
   }
   queue()->enqueue(task);
   // Notify with the lock held to avoid missed notifies.
@@ -678,7 +676,7 @@
   assert(result != NULL, "shouldn't have null task");
   if (TraceGCTaskManager) {
     tty->print_cr("GCTaskManager::get_task(%u) => " INTPTR_FORMAT " [%s]",
-                  which, result, GCTask::Kind::to_string(result->kind()));
+                  which, p2i(result), GCTask::Kind::to_string(result->kind()));
     tty->print_cr("     %s", result->name());
   }
   if (!result->is_idle_task()) {
@@ -864,7 +862,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " IdleGCTask:::do_it()"
       "  should_wait: %s",
-      this, wait_for_task->should_wait() ? "true" : "false");
+      p2i(this), wait_for_task->should_wait() ? "true" : "false");
   }
   MutexLockerEx ml(manager->monitor(), Mutex::_no_safepoint_check_flag);
   if (TraceDynamicGCThreads) {
@@ -878,7 +876,7 @@
       tty->print_cr("[" INTPTR_FORMAT "]"
                     " IdleGCTask::do_it()"
         "  [" INTPTR_FORMAT "] (%s)->wait()",
-        this, manager->monitor(), manager->monitor()->name());
+        p2i(this), p2i(manager->monitor()), manager->monitor()->name());
     }
     manager->monitor()->wait(Mutex::_no_safepoint_check_flag, 0);
   }
@@ -890,7 +888,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " IdleGCTask::do_it() returns"
       "  should_wait: %s",
-      this, wait_for_task->should_wait() ? "true" : "false");
+      p2i(this), wait_for_task->should_wait() ? "true" : "false");
   }
   // Release monitor().
 }
@@ -1000,7 +998,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " WaitForBarrierGCTask::WaitForBarrierGCTask()"
                   "  monitor: " INTPTR_FORMAT,
-                  this, monitor());
+                  p2i(this), p2i(monitor()));
   }
 }
 
@@ -1011,9 +1009,9 @@
                     " WaitForBarrierGCTask::destroy()"
                     "  is_c_heap_obj: %s"
                     "  monitor: " INTPTR_FORMAT,
-                    that,
+                    p2i(that),
                     that->is_c_heap_obj() ? "true" : "false",
-                    that->monitor());
+                    p2i(that->monitor()));
     }
     that->destruct();
     if (that->is_c_heap_obj()) {
@@ -1028,7 +1026,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " WaitForBarrierGCTask::destruct()"
                   "  monitor: " INTPTR_FORMAT,
-                  this, monitor());
+                  p2i(this), p2i(monitor()));
   }
   this->BarrierGCTask::destruct();
   // Clean up that should be in the destructor,
@@ -1044,7 +1042,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " WaitForBarrierGCTask::do_it() waiting for idle"
                   "  monitor: " INTPTR_FORMAT,
-                  this, monitor());
+                  p2i(this), p2i(monitor()));
   }
   {
     // First, wait for the barrier to arrive.
@@ -1062,7 +1060,7 @@
       tty->print_cr("[" INTPTR_FORMAT "]"
                     " WaitForBarrierGCTask::do_it()"
                     "  [" INTPTR_FORMAT "] (%s)->notify_all()",
-                    this, monitor(), monitor()->name());
+                    p2i(this), p2i(monitor()), monitor()->name());
     }
     monitor()->notify_all();
     // Release monitor().
@@ -1074,7 +1072,7 @@
     tty->print_cr("[" INTPTR_FORMAT "]"
                   " WaitForBarrierGCTask::wait_for()"
       "  should_wait: %s",
-      this, should_wait() ? "true" : "false");
+      p2i(this), should_wait() ? "true" : "false");
   }
   {
     // Grab the lock and check again.
@@ -1084,7 +1082,7 @@
         tty->print_cr("[" INTPTR_FORMAT "]"
                       " WaitForBarrierGCTask::wait_for()"
           "  [" INTPTR_FORMAT "] (%s)->wait()",
-          this, monitor(), monitor()->name());
+          p2i(this), p2i(monitor()), monitor()->name());
       }
       monitor()->wait(Mutex::_no_safepoint_check_flag, 0);
     }
@@ -1096,7 +1094,7 @@
       tty->print_cr("[" INTPTR_FORMAT "]"
                     " WaitForBarrierGCTask::wait_for() returns"
         "  should_wait: %s",
-        this, should_wait() ? "true" : "false");
+        p2i(this), should_wait() ? "true" : "false");
     }
     // Release monitor().
   }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -34,8 +34,6 @@
 #include "runtime/os.hpp"
 #include "runtime/thread.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 GCTaskThread::GCTaskThread(GCTaskManager* manager,
                            uint           which,
                            uint           processor_id) :
@@ -79,7 +77,7 @@
   tty->print_cr("GC-Thread %u entries: %d", id(), _time_stamp_index);
   for(uint i=0; i<_time_stamp_index; i++) {
     GCTaskTimeStamp* time_stamp = time_stamp_at(i);
-    tty->print_cr("\t[ %s " INT64_FORMAT " " INT64_FORMAT " ]",
+    tty->print_cr("\t[ %s " JLONG_FORMAT " " JLONG_FORMAT " ]",
                   time_stamp->name(),
                   time_stamp->entry_time(),
                   time_stamp->exit_time());
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -42,8 +42,6 @@
 #include "runtime/vmThread.hpp"
 #include "services/management.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 //
 // ThreadRootsMarkingTask
 //
@@ -256,7 +254,7 @@
     which_stack_index = which;
     assert(manager->active_workers() == ParallelGCThreads,
            err_msg("all_workers_active has been incorrectly set: "
-                   " active %d  ParallelGCThreads %d", manager->active_workers(),
+                   " active %d  ParallelGCThreads " UINTX_FORMAT, manager->active_workers(),
                    ParallelGCThreads));
   } else {
     which_stack_index = ParCompactionManager::pop_recycled_stack_index();
@@ -268,7 +266,7 @@
     gclog_or_tty->print_cr("StealRegionCompactionTask::do_it "
                            "region_stack_index %d region_stack = " PTR_FORMAT " "
                            " empty (%d) use all workers %d",
-    which_stack_index, ParCompactionManager::region_list(which_stack_index),
+    which_stack_index, p2i(ParCompactionManager::region_list(which_stack_index)),
     cm->region_stack()->is_empty(),
     use_all_workers);
   }
@@ -335,7 +333,7 @@
     which_stack_index = which;
     assert(manager->active_workers() == ParallelGCThreads,
            err_msg("all_workers_active has been incorrectly set: "
-                   " active %d  ParallelGCThreads %d", manager->active_workers(),
+                   " active %d  ParallelGCThreads " UINTX_FORMAT, manager->active_workers(),
                    ParallelGCThreads));
   } else {
     which_stack_index = stack_index();
@@ -369,7 +367,7 @@
       void* old_region_stack = (void*) cm->region_stack();
       int old_region_stack_index = cm->region_stack_index();
       gclog_or_tty->print_cr("Pushing region stack " PTR_FORMAT "/%d",
-        old_region_stack, old_region_stack_index);
+        p2i(old_region_stack), old_region_stack_index);
     }
 
     cm->set_region_stack(NULL);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -35,8 +35,6 @@
 
 #include <math.h>
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 PSAdaptiveSizePolicy::PSAdaptiveSizePolicy(size_t init_eden_size,
                                            size_t init_promo_size,
                                            size_t init_survivor_size,
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -54,8 +54,6 @@
 #include "utilities/events.hpp"
 #include "utilities/stack.inline.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 elapsedTimer        PSMarkSweep::_accumulated_time;
 jlong               PSMarkSweep::_time_of_last_gc   = 0;
 CollectorCounters*  PSMarkSweep::_counters = NULL;
@@ -670,7 +668,7 @@
   jlong ret_val = now - _time_of_last_gc;
   // XXX See note in genCollectedHeap::millis_since_last_gc().
   if (ret_val < 0) {
-    NOT_PRODUCT(warning("time warp: "INT64_FORMAT, ret_val);)
+    NOT_PRODUCT(warning("time warp: " JLONG_FORMAT, ret_val);)
     return 0;
   }
   return ret_val;
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -33,8 +33,6 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/java.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 inline const char* PSOldGen::select_name() {
   return UseParallelOldGC ? "ParOldGen" : "PSOldGen";
 }
@@ -440,9 +438,9 @@
                 capacity_in_bytes()/K, used_in_bytes()/K);
   }
   st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
-                virtual_space()->low_boundary(),
-                virtual_space()->high(),
-                virtual_space()->high_boundary());
+                p2i(virtual_space()->low_boundary()),
+                p2i(virtual_space()->high()),
+                p2i(virtual_space()->high_boundary()));
 
   st->print("  object"); object_space()->print_on(st);
 }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -62,8 +62,6 @@
 
 #include <math.h>
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 // All sizes are in HeapWords.
 const size_t ParallelCompactData::Log2RegionSize  = 16; // 64K words
 const size_t ParallelCompactData::RegionSize      = (size_t)1 << Log2RegionSize;
@@ -222,7 +220,7 @@
                 REGION_IDX_FORMAT " " PTR_FORMAT " "
                 REGION_DATA_FORMAT " " REGION_DATA_FORMAT " "
                 REGION_DATA_FORMAT " " REGION_IDX_FORMAT " %d",
-                i, c->data_location(), dci, c->destination(),
+                i, p2i(c->data_location()), dci, p2i(c->destination()),
                 c->partial_obj_size(), c->live_obj_size(),
                 c->data_size(), c->source_region(), c->destination_count());
 
@@ -272,7 +270,7 @@
   tty->print(SIZE_FORMAT_W(5) " " PTR_FORMAT " "
              SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " "
              SIZE_FORMAT_W(5) " " SIZE_FORMAT_W(5) " %d",
-             i, c->destination(),
+             i, p2i(c->destination()),
              c->partial_obj_size(), c->live_obj_size(),
              c->data_size(), c->source_region(), c->destination_count());
   if (newline) tty->cr();
@@ -633,13 +631,13 @@
     const char * split_type = partial_obj_size == 0 ? "easy" : "hard";
     gclog_or_tty->print_cr("%s split:  src=" PTR_FORMAT " src_c=" SIZE_FORMAT
                            " pos=" SIZE_FORMAT,
-                           split_type, source_next, split_region,
+                           split_type, p2i(source_next), split_region,
                            partial_obj_size);
     gclog_or_tty->print_cr("%s split:  dst=" PTR_FORMAT " dst_c=" SIZE_FORMAT
                            " tn=" PTR_FORMAT,
-                           split_type, split_destination,
+                           split_type, p2i(split_destination),
                            addr_to_region_idx(split_destination),
-                           *target_next);
+                           p2i(*target_next));
 
     if (partial_obj_size != 0) {
       HeapWord* const po_beg = split_info.destination();
@@ -648,8 +646,8 @@
                              "po_beg=" PTR_FORMAT " " SIZE_FORMAT " "
                              "po_end=" PTR_FORMAT " " SIZE_FORMAT,
                              split_type,
-                             po_beg, addr_to_region_idx(po_beg),
-                             po_end, addr_to_region_idx(po_end));
+                             p2i(po_beg), addr_to_region_idx(po_beg),
+                             p2i(po_end), addr_to_region_idx(po_end));
     }
   }
 
@@ -666,8 +664,8 @@
     HeapWord* const source_next_val = source_next == NULL ? NULL : *source_next;
     tty->print_cr("sb=" PTR_FORMAT " se=" PTR_FORMAT " sn=" PTR_FORMAT
                   "tb=" PTR_FORMAT " te=" PTR_FORMAT " tn=" PTR_FORMAT,
-                  source_beg, source_end, source_next_val,
-                  target_beg, target_end, *target_next);
+                  p2i(source_beg), p2i(source_end), p2i(source_next_val),
+                  p2i(target_beg), p2i(target_end), p2i(*target_next));
   }
 
   size_t cur_region = addr_to_region_idx(source_beg);
@@ -1132,9 +1130,9 @@
     const size_t cur_deadwood = pointer_delta(dense_prefix, region_destination);
     if (TraceParallelOldGCDensePrefix && Verbose) {
       tty->print_cr("c#=" SIZE_FORMAT_W(4) " dst=" PTR_FORMAT " "
-                    "dp=" SIZE_FORMAT_W(8) " " "cdw=" SIZE_FORMAT_W(8),
-                    sd.region(cp), region_destination,
-                    dense_prefix, cur_deadwood);
+                    "dp=" PTR_FORMAT " " "cdw=" SIZE_FORMAT_W(8),
+                    sd.region(cp), p2i(region_destination),
+                    p2i(dense_prefix), cur_deadwood);
     }
 
     if (cur_deadwood >= deadwood_goal) {
@@ -1200,7 +1198,7 @@
                 "d2l=" SIZE_FORMAT " d2l%%=%6.4f "
                 "d2r=" SIZE_FORMAT " l2r=" SIZE_FORMAT
                 " ratio=%10.8f",
-                algorithm, addr, region_idx,
+                algorithm, p2i(addr), region_idx,
                 space_live,
                 dead_to_left, dead_to_left_pct,
                 dead_to_right, live_to_right,
@@ -1468,7 +1466,7 @@
 {
   if (TraceParallelOldGCSummaryPhase) {
     tty->print_cr("fill_with_live_objects [" PTR_FORMAT " " PTR_FORMAT ") "
-                  SIZE_FORMAT, start, start + words, words);
+                  SIZE_FORMAT, p2i(start), p2i(start + words), words);
   }
 
   ObjectStartArray* const start_array = _space_info[id].start_array();
@@ -1810,9 +1808,9 @@
     tty->print_cr("id=%d cap=" SIZE_FORMAT " dp=" PTR_FORMAT " "
                   "dp_region=" SIZE_FORMAT " " "dp_count=" SIZE_FORMAT " "
                   "cr_count=" SIZE_FORMAT " " "nt=" PTR_FORMAT,
-                  id, space->capacity_in_words(), dense_prefix_end,
+                  id, space->capacity_in_words(), p2i(dense_prefix_end),
                   dp_region, dp_words / region_size,
-                  cr_words / region_size, new_top);
+                  cr_words / region_size, p2i(new_top));
   }
 }
 
@@ -1830,10 +1828,10 @@
                   SIZE_FORMAT "-" SIZE_FORMAT,
                   src_space_id, space_names[src_space_id],
                   dst_space_id, space_names[dst_space_id],
-                  src_beg, src_end,
+                  p2i(src_beg), p2i(src_end),
                   _summary_data.addr_to_region_idx(src_beg),
                   _summary_data.addr_to_region_idx(src_end),
-                  dst_beg, dst_end,
+                  p2i(dst_beg), p2i(dst_end),
                   _summary_data.addr_to_region_idx(dst_beg),
                   _summary_data.addr_to_region_idx(dst_end));
   }
@@ -2233,8 +2231,8 @@
   heap->trace_heap_after_gc(&_gc_tracer);
 
   if (PrintGCTaskTimeStamps) {
-    gclog_or_tty->print_cr("VM-Thread " INT64_FORMAT " " INT64_FORMAT " "
-                           INT64_FORMAT,
+    gclog_or_tty->print_cr("VM-Thread " JLONG_FORMAT " " JLONG_FORMAT " "
+                           JLONG_FORMAT,
                            marking_start.ticks(), compaction_start.ticks(),
                            collection_exit.ticks());
     gc_task_manager()->print_task_time_stamps();
@@ -2753,7 +2751,7 @@
     const RegionData* const c = sd.region(cur_region);
     if (!c->completed()) {
       warning("region " SIZE_FORMAT " not filled:  "
-              "destination_count=" SIZE_FORMAT,
+              "destination_count=%u",
               cur_region, c->destination_count());
       issued_a_warning = true;
     }
@@ -2763,7 +2761,7 @@
     const RegionData* const c = sd.region(cur_region);
     if (!c->available()) {
       warning("region " SIZE_FORMAT " not empty:   "
-              "destination_count=" SIZE_FORMAT,
+              "destination_count=%u",
               cur_region, c->destination_count());
       issued_a_warning = true;
     }
@@ -3298,7 +3296,7 @@
   jlong ret_val = now - _time_of_last_gc;
   // XXX See note in genCollectedHeap::millis_since_last_gc().
   if (ret_val < 0) {
-    NOT_PRODUCT(warning("time warp: "INT64_FORMAT, ret_val);)
+    NOT_PRODUCT(warning("time warp: " JLONG_FORMAT, ret_val);)
     return 0;
   }
   return ret_val;
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -35,8 +35,6 @@
 #include "oops/oop.inline.hpp"
 #include "utilities/stack.inline.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 PaddedEnd<PSPromotionManager>* PSPromotionManager::_manager_array = NULL;
 OopStarTaskQueueSet*           PSPromotionManager::_stack_array_depth = NULL;
 PSOldGen*                      PSPromotionManager::_old_gen = NULL;
@@ -341,7 +339,7 @@
     gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " (%d)}",
                            "promotion-failure",
                            obj->klass()->internal_name(),
-                           (void *)obj, obj->size());
+                           p2i(obj), obj->size());
 
   }
 #endif
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -55,8 +55,6 @@
 #include "services/memoryService.hpp"
 #include "utilities/stack.inline.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 HeapWord*                  PSScavenge::_to_space_top_before_gc = NULL;
 int                        PSScavenge::_consecutive_skipped_scavenges = 0;
 ReferenceProcessor*        PSScavenge::_ref_processor = NULL;
@@ -550,8 +548,8 @@
 
        if (PrintTenuringDistribution) {
          gclog_or_tty->cr();
-         gclog_or_tty->print_cr("Desired survivor size " SIZE_FORMAT " bytes, new threshold "
-                                UINTX_FORMAT " (max threshold " UINTX_FORMAT ")",
+         gclog_or_tty->print_cr("Desired survivor size " SIZE_FORMAT " bytes, new threshold %u"
+                                " (max threshold " UINTX_FORMAT ")",
                                 size_policy->calculated_survivor_size_in_bytes(),
                                 _tenuring_threshold, MaxTenuringThreshold);
        }
@@ -693,7 +691,7 @@
   scavenge_exit.update();
 
   if (PrintGCTaskTimeStamps) {
-    tty->print_cr("VM-Thread " INT64_FORMAT " " INT64_FORMAT " " INT64_FORMAT,
+    tty->print_cr("VM-Thread " JLONG_FORMAT " " JLONG_FORMAT " " JLONG_FORMAT,
                   scavenge_entry.ticks(), scavenge_midpoint.ticks(),
                   scavenge_exit.ticks());
     gc_task_manager()->print_task_time_stamps();
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -27,8 +27,6 @@
 #include "runtime/os.hpp"
 #include "runtime/virtualspace.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 // PSVirtualSpace
 
 PSVirtualSpace::PSVirtualSpace(ReservedSpace rs, size_t alignment) :
@@ -218,22 +216,22 @@
 void PSVirtualSpace::print() const {
   gclog_or_tty->print_cr("virtual space [" PTR_FORMAT "]:  alignment="
                          SIZE_FORMAT "K grows %s%s",
-                         this, alignment() / K, grows_up() ? "up" : "down",
+                         p2i(this), alignment() / K, grows_up() ? "up" : "down",
                          special() ? " (pinned in memory)" : "");
   gclog_or_tty->print_cr("    reserved=" SIZE_FORMAT "K"
                          " [" PTR_FORMAT "," PTR_FORMAT "]"
                          " committed=" SIZE_FORMAT "K"
                          " [" PTR_FORMAT "," PTR_FORMAT "]",
                          reserved_size() / K,
-                         reserved_low_addr(), reserved_high_addr(),
+                         p2i(reserved_low_addr()), p2i(reserved_high_addr()),
                          committed_size() / K,
-                         committed_low_addr(), committed_high_addr());
+                         p2i(committed_low_addr()), p2i(committed_high_addr()));
 }
 #endif // #ifndef PRODUCT
 
 void PSVirtualSpace::print_space_boundaries_on(outputStream* st) const {
   st->print_cr(" [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT ")",
-               low_boundary(), high(), high_boundary());
+               p2i(low_boundary()), p2i(high()), p2i(high_boundary()));
 }
 
 PSVirtualSpaceHighToLow::PSVirtualSpaceHighToLow(ReservedSpace rs,
@@ -350,5 +348,5 @@
 void
 PSVirtualSpaceHighToLow::print_space_boundaries_on(outputStream* st) const {
   st->print_cr(" (" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT "]",
-               high_boundary(), low(), low_boundary());
+               p2i(high_boundary()), p2i(low()), p2i(low_boundary()));
 }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp	Fri Mar 27 15:10:11 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp	Fri Mar 27 15:24:49 2015 +0100
@@ -33,8 +33,6 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/java.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 PSYoungGen::PSYoungGen(size_t        initial_size,
                        size_t        min_size,
                        size_t        max_size) :
@@ -419,20 +417,22 @@
     // s1
     gclog_or_tty->print_cr("Current region: [" PTR_FORMAT ", " PTR_FORMAT ") "
       "New region: [" PTR_FORMAT ", " PTR_FORMAT ")",
-      s1->bottom(), s1->end(), s1MR.start(), s1MR.end());
+      p2i(s1->bottom()), p2i(s1->end()),
+      p2i(s1MR.start()), p2i(s1MR.end()));
     gclog_or_tty->print_cr("    Mangle before: [" PTR_FORMAT ", "
       PTR_FORMAT ")  Mangle after: [" PTR_FORMAT ", " PTR_FORMAT ")",
-      delta1_left.start(), delta1_left.end(), delta1_right.start(),
-      delta1_right.end());
+      p2i(delta1_left.start()), p2i(delta1_left.end()),
+      p2i(delta1_right.start()), p2i(delta1_right.end()));
 
     // s2
     gclog_or_tty->print_cr("Current region: [" PTR_FORMAT ", " PTR_FORMAT ") "
       "New region: [" PTR_FORMAT ", " PTR_FORMAT ")",
-      s2->bottom(), s2->end(), s2MR.start(), s2MR.end());
+      p2i(s2->bottom()), p2i(s2->end()),
+      p2i(s2MR.start()), p2i(s2MR.end()));
     gclog_or_tty->print_cr("    Mangle before: [" PTR_FORMAT ", "
       PTR_FORMAT ")  Mangle after: [" PTR_FORMAT ", " PTR_FORMAT ")",
-      delta2_left.start(), delta2_left.end(), delta2_right.start(),
-      delta2_right.end());
+      p2i(delta2_left.start()), p2i(delta2_left.end()),
+      p2i(delta2_right.start()), p2i(delta2_right.end()));
   }
 
 }
@@ -456,22 +456,22 @@
                   requested_eden_size, requested_survivor_size);
     gclog_or_tty->print_cr("    eden: [" PTR_FORMAT ".." PTR_FORMAT ") "
                   SIZE_FORMAT,
-                  eden_space()->bottom(),
-                  eden_space()->end(),
+                  p2i(eden_space()->bottom()),
+                  p2i(eden_space()->end()),
                   pointer_delta(eden_space()->end(),
                                 eden_space()->bottom(),
                                 sizeof(char)));
     gclog_or_tty->print_cr("    from: [" PTR_FORMAT ".." PTR_FORMAT ") "
                   SIZE_FORMAT,
-                  from_space()->bottom(),
-                  from_space()->end(),
+                  p2i(from_space()->bottom()),
+                  p2i(from_space()->end()),
                   pointer_delta(from_space()->end(),
                                 from_space()->bottom(),
                                 sizeof(char)));
     gclog_or_tty->print_cr("      to: [" PTR_FORMAT ".." PTR_FORMAT ") "
                   SIZE_FORMAT,
-                  to_space()->bottom(),
-                  to_space()->end(),
+                  p2i(to_space()->bottom()),
+                  p2i(to_space()->end()),
                   pointer_delta(  to_space()->end(),
                                   to_space()->bottom(),
                                   sizeof(char)));
@@ -572,18 +572,18 @@
     if (PrintAdaptiveSizePolicy && Verbose) {
       gclog_or_tty->print_cr("    [eden_start .. eden_end): "
                     "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT,
-                    eden_start,
-                    eden_end,
+                    p2i(eden_start),
+                    p2i(eden_end),
                     pointer_delta(eden_end, eden_start, sizeof(char)));
       gclog_or_tty->print_cr("    [from_start .. from_end): "
                     "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT,
-                    from_start,
-                    from_end,
+                    p2i(from_start),
+                    p2i(from_end),
                     pointer_delta(from_end, from_start, sizeof(char)));
       gclog_or_tty->print_cr("    [  to_start ..   to_end): "
                     "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT,
-                    to_start,
-                    to_end,
+                    p2i(to_start),
+                    p2i(to_end),
                     pointer_delta(  to_end,   to_start, sizeof(char)));
     }
   } else {
@@ -629,18 +629,18 @@
     if (PrintAdaptiveSizePolicy && Verbose) {
       gclog_or_tty->print_cr("    [eden_start .. eden_end): "
                     "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT,
-                    eden_start,
-                    eden_end,
+                    p2i(eden_start),
+                    p2i(eden_end),
                     pointer_delta(eden_end, eden_start, sizeof(char)));
       gclog_or_tty->print_cr("    [  to_start ..   to_end): "
                     "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT,
-                    to_start,
-                    to_end,
+                    p2i(to_start),
+                    p2i(to_end),
                     pointer_delta(  to_end,   to_start, sizeof(char)));
       gclog_or_tty->print_cr("    [from_start .. from_end): "
                     "[" PTR_FORMAT " .. " PTR_FORMAT ") " SIZE_FORMAT,
-                    from_start,
-                    from_end,
+                    p2i(from_start),
+                    p2i(from_end),
                     pointer_delta(from_end, from_start, sizeof(char)));
     }
   }