8076054: g1: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files
authordavid
Fri, 27 Mar 2015 15:03:44 +0100
changeset 29796 7a04e5c250d1
parent 29795 984c5c379c6a
child 29797 4d360e3ddebf
8076054: g1: PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC needs to be removed from source files Reviewed-by: brutisso, stefank
hotspot/src/share/vm/gc_implementation/g1/g1CardCounts.cpp
hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp
hotspot/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp
hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp
hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp
hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp
hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -31,8 +31,6 @@
 #include "services/memTracker.hpp"
 #include "utilities/copy.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 void G1CardCountsMappingChangedListener::on_commit(uint start_idx, size_t num_regions, bool zero_filled) {
   if (zero_filled) {
     return;
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -33,8 +33,6 @@
 #include "utilities/hashtable.inline.hpp"
 #include "utilities/stack.inline.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 class CodeRootSetTable : public Hashtable<nmethod*, mtGC> {
   friend class G1CodeRootSetTest;
   typedef HashtableEntry<nmethod*, mtGC> Entry;
--- a/hotspot/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1HRPrinter.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -27,8 +27,6 @@
 #include "gc_implementation/g1/heapRegion.hpp"
 #include "utilities/ostream.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 const char* G1HRPrinter::action_name(ActionType action) {
   switch(action) {
     case Alloc:          return "ALLOC";
@@ -85,18 +83,18 @@
   if (type_str != NULL) {
     if (top != NULL) {
       gclog_or_tty->print_cr(G1HR_PREFIX" %s(%s) "PTR_FORMAT" "PTR_FORMAT,
-                             action_str, type_str, bottom, top);
+                             action_str, type_str, p2i(bottom), p2i(top));
     } else {
       gclog_or_tty->print_cr(G1HR_PREFIX" %s(%s) "PTR_FORMAT,
-                             action_str, type_str, bottom);
+                             action_str, type_str, p2i(bottom));
     }
   } else {
     if (top != NULL) {
       gclog_or_tty->print_cr(G1HR_PREFIX" %s "PTR_FORMAT" "PTR_FORMAT,
-                             action_str, bottom, top);
+                             action_str, p2i(bottom), p2i(top));
     } else {
       gclog_or_tty->print_cr(G1HR_PREFIX" %s "PTR_FORMAT,
-                             action_str, bottom);
+                             action_str, p2i(bottom));
     }
   }
 }
@@ -105,7 +103,7 @@
   const char* action_str = action_name(action);
 
   gclog_or_tty->print_cr(G1HR_PREFIX" %s ["PTR_FORMAT","PTR_FORMAT"]",
-                         action_str, bottom, end);
+                         action_str, p2i(bottom), p2i(end));
 }
 
 void G1HRPrinter::print(PhaseType phase, size_t phase_num) {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -39,8 +39,6 @@
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/intHisto.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 #define CARD_REPEAT_HISTO 0
 
 #if CARD_REPEAT_HISTO
@@ -156,9 +154,9 @@
                            "RS names card " SIZE_FORMAT_HEX ": "
                            "[" PTR_FORMAT ", " PTR_FORMAT ")",
                            _worker_i,
-                           card_region->bottom(), card_region->end(),
+                           p2i(card_region->bottom()), p2i(card_region->end()),
                            card_index,
-                           card_start, card_start + G1BlockOffsetSharedArray::N_words);
+                           p2i(card_start), p2i(card_start + G1BlockOffsetSharedArray::N_words));
   }
 
   void scan_strong_code_roots(HeapRegion* r) {
@@ -428,7 +426,7 @@
          err_msg("Card at "PTR_FORMAT" index "SIZE_FORMAT" representing heap at "PTR_FORMAT" (%u) must be in committed heap",
                  p2i(card_ptr),
                  _ct_bs->index_for(_ct_bs->addr_for(card_ptr)),
-                 _ct_bs->addr_for(card_ptr),
+                 p2i(_ct_bs->addr_for(card_ptr)),
                  _g1->addr_to_region(_ct_bs->addr_for(card_ptr))));
 
   // If the card is no longer dirty, nothing to do.
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -39,8 +39,6 @@
 #include "runtime/atomic.inline.hpp"
 #include "runtime/orderAccess.inline.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 int    HeapRegion::LogOfHRGrainBytes = 0;
 int    HeapRegion::LogOfHRGrainWords = 0;
 size_t HeapRegion::GrainBytes        = 0;
@@ -505,7 +503,7 @@
           gclog_or_tty->print_cr("Object "PTR_FORMAT" in region "
                                  "["PTR_FORMAT", "PTR_FORMAT") is above "
                                  "top "PTR_FORMAT,
-                                 (void *)obj, _hr->bottom(), _hr->end(), _hr->top());
+                                 p2i(obj), p2i(_hr->bottom()), p2i(_hr->end()), p2i(_hr->top()));
           _failures = true;
           return;
         }
@@ -540,7 +538,7 @@
       if (!nm->is_alive()) {
         gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has dead nmethod "
                                PTR_FORMAT" in its strong code roots",
-                               _hr->bottom(), _hr->end(), nm);
+                               p2i(_hr->bottom()), p2i(_hr->end()), p2i(nm));
         _failures = true;
       } else {
         VerifyStrongCodeRootOopClosure oop_cl(_hr, nm);
@@ -549,12 +547,12 @@
           gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has nmethod "
                                  PTR_FORMAT" in its strong code roots "
                                  "with no pointers into region",
-                                 _hr->bottom(), _hr->end(), nm);
+                                 p2i(_hr->bottom()), p2i(_hr->end()), p2i(nm));
           _failures = true;
         } else if (oop_cl.failures()) {
           gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has other "
                                  "failures for nmethod "PTR_FORMAT,
-                                 _hr->bottom(), _hr->end(), nm);
+                                 p2i(_hr->bottom()), p2i(_hr->end()), p2i(nm));
           _failures = true;
         }
       }
@@ -589,7 +587,7 @@
     if (strong_code_roots_length > 0) {
       gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] is empty "
                              "but has "SIZE_FORMAT" code root entries",
-                             bottom(), end(), strong_code_roots_length);
+                             p2i(bottom()), p2i(end()), strong_code_roots_length);
       *failures = true;
     }
     return;
@@ -624,7 +622,7 @@
     st->print("   ");
   st->print(" TS %5d", _gc_time_stamp);
   st->print(" PTAMS "PTR_FORMAT" NTAMS "PTR_FORMAT,
-            prev_top_at_mark_start(), next_top_at_mark_start());
+            p2i(prev_top_at_mark_start()), p2i(next_top_at_mark_start()));
   G1OffsetTableContigSpace::print_on(st);
 }
 
@@ -687,23 +685,23 @@
           gclog_or_tty->print_cr("Field "PTR_FORMAT
                                  " of live obj "PTR_FORMAT" in region "
                                  "["PTR_FORMAT", "PTR_FORMAT")",
-                                 p, (void*) _containing_obj,
-                                 from->bottom(), from->end());
+                                 p2i(p), p2i(_containing_obj),
+                                 p2i(from->bottom()), p2i(from->end()));
           print_object(gclog_or_tty, _containing_obj);
           gclog_or_tty->print_cr("points to obj "PTR_FORMAT" not in the heap",
-                                 (void*) obj);
+                                 p2i(obj));
         } else {
           HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p);
           HeapRegion* to   = _g1h->heap_region_containing((HeapWord*)obj);
           gclog_or_tty->print_cr("Field "PTR_FORMAT
                                  " of live obj "PTR_FORMAT" in region "
                                  "["PTR_FORMAT", "PTR_FORMAT")",
-                                 p, (void*) _containing_obj,
-                                 from->bottom(), from->end());
+                                 p2i(p), p2i(_containing_obj),
+                                 p2i(from->bottom()), p2i(from->end()));
           print_object(gclog_or_tty, _containing_obj);
           gclog_or_tty->print_cr("points to dead obj "PTR_FORMAT" in region "
                                  "["PTR_FORMAT", "PTR_FORMAT")",
-                                 (void*) obj, to->bottom(), to->end());
+                                 p2i(obj), p2i(to->bottom()), p2i(to->end()));
           print_object(gclog_or_tty, obj);
         }
         gclog_or_tty->print_cr("----------");
@@ -741,12 +739,12 @@
             gclog_or_tty->print_cr("Field "PTR_FORMAT" "
                                    "of obj "PTR_FORMAT", "
                                    "in region "HR_FORMAT,
-                                   p, (void*) _containing_obj,
+                                   p2i(p), p2i(_containing_obj),
                                    HR_FORMAT_PARAMS(from));
             _containing_obj->print_on(gclog_or_tty);
             gclog_or_tty->print_cr("points to obj "PTR_FORMAT" "
                                    "in region "HR_FORMAT,
-                                   (void*) obj,
+                                   p2i(obj),
                                    HR_FORMAT_PARAMS(to));
             obj->print_on(gclog_or_tty);
             gclog_or_tty->print_cr("Obj head CTE = %d, field CTE = %d.",
@@ -783,7 +781,7 @@
         !g1->is_obj_dead(obj, this)) { // Dead objects may have bigger block_size since they span several objects.
       gclog_or_tty->print_cr("obj "PTR_FORMAT" is of %shumongous size ("
                              SIZE_FORMAT" words) in a %shumongous region",
-                             p, g1->is_humongous(obj_size) ? "" : "non-",
+                             p2i(p), g1->is_humongous(obj_size) ? "" : "non-",
                              obj_size, is_region_humongous ? "" : "non-");
        *failures = true;
        return;
@@ -797,12 +795,12 @@
                                    ClassLoaderDataGraph::unload_list_contains(klass));
         if (!is_metaspace_object) {
           gclog_or_tty->print_cr("klass "PTR_FORMAT" of object "PTR_FORMAT" "
-                                 "not metadata", klass, (void *)obj);
+                                 "not metadata", p2i(klass), p2i(obj));
           *failures = true;
           return;
         } else if (!klass->is_klass()) {
           gclog_or_tty->print_cr("klass "PTR_FORMAT" of object "PTR_FORMAT" "
-                                 "not a klass", klass, (void *)obj);
+                                 "not a klass", p2i(klass), p2i(obj));
           *failures = true;
           return;
         } else {
@@ -817,7 +815,7 @@
           }
         }
       } else {
-        gclog_or_tty->print_cr(PTR_FORMAT" no an oop", (void *)obj);
+        gclog_or_tty->print_cr(PTR_FORMAT" no an oop", p2i(obj));
         *failures = true;
         return;
       }
@@ -832,7 +830,7 @@
 
   if (p != top()) {
     gclog_or_tty->print_cr("end of last object "PTR_FORMAT" "
-                           "does not match top "PTR_FORMAT, p, top());
+                           "does not match top "PTR_FORMAT, p2i(p), p2i(top()));
     *failures = true;
     return;
   }
@@ -849,7 +847,7 @@
     if (b_start_1 != p) {
       gclog_or_tty->print_cr("BOT look up for top: "PTR_FORMAT" "
                              " yielded "PTR_FORMAT", expecting "PTR_FORMAT,
-                             addr_1, b_start_1, p);
+                             p2i(addr_1), p2i(b_start_1), p2i(p));
       *failures = true;
       return;
     }
@@ -861,7 +859,7 @@
       if (b_start_2 != p) {
         gclog_or_tty->print_cr("BOT look up for top + 1: "PTR_FORMAT" "
                                " yielded "PTR_FORMAT", expecting "PTR_FORMAT,
-                               addr_2, b_start_2, p);
+                               p2i(addr_2), p2i(b_start_2), p2i(p));
         *failures = true;
         return;
       }
@@ -875,7 +873,7 @@
       if (b_start_3 != p) {
         gclog_or_tty->print_cr("BOT look up for top + diff: "PTR_FORMAT" "
                                " yielded "PTR_FORMAT", expecting "PTR_FORMAT,
-                               addr_3, b_start_3, p);
+                               p2i(addr_3), p2i(b_start_3), p2i(p));
         *failures = true;
         return;
       }
@@ -887,7 +885,7 @@
     if (b_start_4 != p) {
       gclog_or_tty->print_cr("BOT look up for end - 1: "PTR_FORMAT" "
                              " yielded "PTR_FORMAT", expecting "PTR_FORMAT,
-                             addr_4, b_start_4, p);
+                             p2i(addr_4), p2i(b_start_4), p2i(p));
       *failures = true;
       return;
     }
@@ -896,7 +894,7 @@
   if (is_region_humongous && object_num > 1) {
     gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] is humongous "
                            "but has "SIZE_FORMAT", objects",
-                           bottom(), end(), object_num);
+                           p2i(bottom()), p2i(end()), object_num);
     *failures = true;
     return;
   }
@@ -947,7 +945,7 @@
   print_short();
   gclog_or_tty->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", "
                 INTPTR_FORMAT ", " INTPTR_FORMAT ")",
-                bottom(), top(), _offsets.threshold(), end());
+                p2i(bottom()), p2i(top()), p2i(_offsets.threshold()), p2i(end()));
 }
 
 HeapWord* G1OffsetTableContigSpace::initialize_threshold() {
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -37,8 +37,6 @@
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/growableArray.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 class PerRegionTable: public CHeapObj<mtGC> {
   friend class OtherRegionsTable;
   friend class HeapRegionRemSetIterator;
@@ -93,10 +91,10 @@
 
     if (G1TraceHeapRegionRememberedSet) {
       gclog_or_tty->print_cr("    PRT::Add_reference_work(" PTR_FORMAT "->" PTR_FORMAT").",
-                             from,
+                             p2i(from),
                              UseCompressedOops
-                             ? (void *)oopDesc::load_decode_heap_oop((narrowOop*)from)
-                             : (void *)oopDesc::load_decode_heap_oop((oop*)from));
+                             ? p2i(oopDesc::load_decode_heap_oop((narrowOop*)from))
+                             : p2i(oopDesc::load_decode_heap_oop((oop*)from)));
     }
 
     HeapRegion* loc_hr = hr();
@@ -412,17 +410,17 @@
 
   if (G1TraceHeapRegionRememberedSet) {
     gclog_or_tty->print_cr("ORT::add_reference_work(" PTR_FORMAT "->" PTR_FORMAT ").",
-                                                    from,
+                                                    p2i(from),
                                                     UseCompressedOops
-                                                    ? (void *)oopDesc::load_decode_heap_oop((narrowOop*)from)
-                                                    : (void *)oopDesc::load_decode_heap_oop((oop*)from));
+                                                    ? p2i(oopDesc::load_decode_heap_oop((narrowOop*)from))
+                                                    : p2i(oopDesc::load_decode_heap_oop((oop*)from)));
   }
 
   int from_card = (int)(uintptr_t(from) >> CardTableModRefBS::card_shift);
 
   if (G1TraceHeapRegionRememberedSet) {
     gclog_or_tty->print_cr("Table for [" PTR_FORMAT "...): card %d (cache = %d)",
-                  _hr->bottom(), from_card,
+                  p2i(_hr->bottom()), from_card,
                   FromCardCache::at(tid, cur_hrm_ind));
   }
 
@@ -471,7 +469,7 @@
                                 "[" PTR_FORMAT "...) for ref " PTR_FORMAT ".\n",
                                 align_size_down(uintptr_t(from),
                                                 CardTableModRefBS::card_size),
-                                _hr->bottom(), from);
+                                p2i(_hr->bottom()), p2i(from));
           }
         }
         if (G1TraceHeapRegionRememberedSet) {
@@ -533,7 +531,7 @@
                           "[" PTR_FORMAT "...) for ref " PTR_FORMAT ".\n",
                           align_size_down(uintptr_t(from),
                                           CardTableModRefBS::card_size),
-                          _hr->bottom(), from);
+                          p2i(_hr->bottom()), p2i(from));
     }
   }
   assert(contains_reference(from), "We just added it!");
@@ -602,8 +600,8 @@
     if (G1TraceHeapRegionRememberedSet) {
       gclog_or_tty->print("Coarsened entry in region [" PTR_FORMAT "...] "
                  "for region [" PTR_FORMAT "...] (" SIZE_FORMAT " coarse entries).\n",
-                 _hr->bottom(),
-                 max->hr()->bottom(),
+                 p2i(_hr->bottom()),
+                 p2i(max->hr()->bottom()),
                  _n_coarse_entries);
     }
   }
@@ -857,7 +855,7 @@
   while (iter.has_next(card_index)) {
     HeapWord* card_start =
       G1CollectedHeap::heap()->bot_shared()->address_for_index(card_index);
-    gclog_or_tty->print_cr("  Card " PTR_FORMAT, card_start);
+    gclog_or_tty->print_cr("  Card " PTR_FORMAT, p2i(card_start));
   }
   if (iter.n_yielded() != occupied()) {
     gclog_or_tty->print_cr("Yielded disagrees with occupied:");
@@ -1152,8 +1150,8 @@
     }
     gclog_or_tty->print("Added card " PTR_FORMAT " to region [" PTR_FORMAT "...]"
                         " for ref " PTR_FORMAT ".\n",
-                        _recorded_cards[i], _recorded_regions[i]->bottom(),
-                        _recorded_oops[i]);
+                        p2i(_recorded_cards[i]), p2i(_recorded_regions[i]->bottom()),
+                        p2i(_recorded_oops[i]));
   }
 }
 
@@ -1240,7 +1238,7 @@
   while (iter.has_next(card_index)) {
     HeapWord* card_start =
       G1CollectedHeap::heap()->bot_shared()->address_for_index(card_index);
-    gclog_or_tty->print_cr("  Card " PTR_FORMAT ".", card_start);
+    gclog_or_tty->print_cr("  Card " PTR_FORMAT ".", p2i(card_start));
     sum++;
   }
   guarantee(sum == 11 - 3 + 2048, "Failure");
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -27,8 +27,6 @@
 #include "gc_implementation/g1/heapRegionRemSet.hpp"
 #include "gc_implementation/g1/heapRegionSet.inline.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 uint FreeRegionList::_unrealistically_long_length = 0;
 
 void HeapRegionSetBase::fill_in_ext_msg(hrs_ext_msg* msg, const char* message) {
@@ -84,7 +82,7 @@
 
 void HeapRegionSetBase::print_on(outputStream* out, bool print_contents) {
   out->cr();
-  out->print_cr("Set: %s ("PTR_FORMAT")", name(), this);
+  out->print_cr("Set: %s ("PTR_FORMAT")", name(), p2i(this));
   out->print_cr("  Region Assumptions");
   out->print_cr("    humongous         : %s", BOOL_TO_STR(regions_humongous()));
   out->print_cr("    free              : %s", BOOL_TO_STR(regions_free()));
@@ -106,7 +104,7 @@
 }
 
 void FreeRegionList::fill_in_ext_msg_extra(hrs_ext_msg* msg) {
-  msg->append(" hd: "PTR_FORMAT" tl: "PTR_FORMAT, _head, _tail);
+  msg->append(" hd: "PTR_FORMAT" tl: "PTR_FORMAT, p2i(_head), p2i(_tail));
 }
 
 void FreeRegionList::remove_all() {
@@ -277,8 +275,8 @@
 void FreeRegionList::print_on(outputStream* out, bool print_contents) {
   HeapRegionSetBase::print_on(out, print_contents);
   out->print_cr("  Linking");
-  out->print_cr("    head              : "PTR_FORMAT, _head);
-  out->print_cr("    tail              : "PTR_FORMAT, _tail);
+  out->print_cr("    head              : "PTR_FORMAT, p2i(_head));
+  out->print_cr("    tail              : "PTR_FORMAT, p2i(_tail));
 
   if (print_contents) {
     out->print_cr("  Contents");
@@ -306,7 +304,8 @@
 
     count++;
     guarantee(count < _unrealistically_long_length,
-        hrs_err_msg("[%s] the calculated length: %u seems very long, is there maybe a cycle? curr: "PTR_FORMAT" prev0: "PTR_FORMAT" " "prev1: "PTR_FORMAT" length: %u", name(), count, curr, prev0, prev1, length()));
+        hrs_err_msg("[%s] the calculated length: %u seems very long, is there maybe a cycle? curr: "PTR_FORMAT" prev0: "PTR_FORMAT" " "prev1: "PTR_FORMAT" length: %u",
+            name(), count, p2i(curr), p2i(prev0), p2i(prev1), length()));
 
     if (curr->next() != NULL) {
       guarantee(curr->next()->prev() == curr, "Next or prev pointers messed up");
--- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -32,8 +32,6 @@
 #include "runtime/thread.hpp"
 #include "runtime/vmThread.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 void ObjPtrQueue::flush() {
   // The buffer might contain refs into the CSet. We have to filter it
   // first before we flush it, otherwise we might end up with an
@@ -182,7 +180,7 @@
                         void** buf, size_t index, size_t sz) {
   gclog_or_tty->print_cr("  SATB BUFFER [%s] buf: "PTR_FORMAT" "
                          "index: "SIZE_FORMAT" sz: "SIZE_FORMAT,
-                         name, buf, index, sz);
+                         name, p2i(buf), index, sz);
 }
 #endif // PRODUCT
 
--- a/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp	Fri Mar 27 09:28:47 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp	Fri Mar 27 15:03:44 2015 +0100
@@ -29,8 +29,6 @@
 #include "gc_implementation/g1/survRateGroup.hpp"
 #include "memory/allocation.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 SurvRateGroup::SurvRateGroup(G1CollectorPolicy* g1p,
                              const char* name,
                              size_t summary_surv_rates_len) :