8039957: Replace the last few %p usages with PTR_FORMAT in the GC code
Reviewed-by: jwilhelm, sjohanss, jmasa
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Apr 15 18:09:53 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Apr 15 20:46:23 2014 +0200
@@ -57,6 +57,7 @@
#include "oops/oop.inline.hpp"
#include "oops/oop.pcgc.inline.hpp"
#include "runtime/vmThread.hpp"
+#include "utilities/globalDefinitions.hpp"
#include "utilities/ticks.hpp"
size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
@@ -3222,7 +3223,7 @@
_young_ref_counter_closure.reset_count();
k->oops_do(&_young_ref_counter_closure);
if (_young_ref_counter_closure.count() > 0) {
- guarantee(k->has_modified_oops(), err_msg("Klass %p, has young refs but is not dirty.", k));
+ guarantee(k->has_modified_oops(), err_msg("Klass " PTR_FORMAT ", has young refs but is not dirty.", k));
}
}
};
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Tue Apr 15 18:09:53 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Tue Apr 15 20:46:23 2014 +0200
@@ -36,6 +36,7 @@
#include "gc_implementation/g1/heapRegionRemSet.hpp"
#include "memory/iterator.hpp"
#include "oops/oop.inline.hpp"
+#include "utilities/globalDefinitions.hpp"
#include "utilities/intHisto.hpp"
#define CARD_REPEAT_HISTO 0
@@ -163,7 +164,7 @@
void printCard(HeapRegion* card_region, size_t card_index,
HeapWord* card_start) {
gclog_or_tty->print_cr("T %u Region [" PTR_FORMAT ", " PTR_FORMAT ") "
- "RS names card %p: "
+ "RS names card " SIZE_FORMAT_HEX ": "
"[" PTR_FORMAT ", " PTR_FORMAT ")",
_worker_i,
card_region->bottom(), card_region->end(),
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp Tue Apr 15 18:09:53 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp Tue Apr 15 20:46:23 2014 +0200
@@ -128,8 +128,6 @@
// When doing MT offsets, we can't assert this.
//assert(offset > *block, "Found backwards allocation");
*block = (jbyte)offset;
-
- // tty->print_cr("[%p]", p);
}
// Optimized for finding the first object that crosses into
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp Tue Apr 15 18:09:53 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp Tue Apr 15 20:46:23 2014 +0200
@@ -31,6 +31,7 @@
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
#include "memory/iterator.hpp"
+#include "utilities/globalDefinitions.hpp"
inline void PSScavenge::save_to_space_top_before_gc() {
ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
@@ -178,7 +179,7 @@
#ifndef PRODUCT
if (TraceScavenge) {
ResourceMark rm;
- gclog_or_tty->print_cr("PSScavengeKlassClosure::do_klass %p, %s, dirty: %s",
+ gclog_or_tty->print_cr("PSScavengeKlassClosure::do_klass " PTR_FORMAT ", %s, dirty: %s",
klass,
klass->external_name(),
klass->has_modified_oops() ? "true" : "false");
--- a/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp Tue Apr 15 18:09:53 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp Tue Apr 15 20:46:23 2014 +0200
@@ -27,6 +27,7 @@
#include "memory/sharedHeap.hpp"
#include "oops/arrayOop.hpp"
#include "oops/oop.inline.hpp"
+#include "utilities/globalDefinitions.hpp"
ParGCAllocBuffer::ParGCAllocBuffer(size_t desired_plab_sz_) :
_word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL),
@@ -132,8 +133,9 @@
#ifndef PRODUCT
void ParGCAllocBuffer::print() {
- gclog_or_tty->print("parGCAllocBuffer: _bottom: %p _top: %p _end: %p _hard_end: %p"
- "_retained: %c _retained_filler: [%p,%p)\n",
+ gclog_or_tty->print("parGCAllocBuffer: _bottom: " PTR_FORMAT " _top: " PTR_FORMAT
+ " _end: " PTR_FORMAT " _hard_end: " PTR_FORMAT " _retained: %c"
+ " _retained_filler: [" PTR_FORMAT "," PTR_FORMAT ")\n",
_bottom, _top, _end, _hard_end,
"FT"[_retained], _retained_filler.start(), _retained_filler.end());
}
--- a/hotspot/src/share/vm/memory/defNewGeneration.cpp Tue Apr 15 18:09:53 2014 +0200
+++ b/hotspot/src/share/vm/memory/defNewGeneration.cpp Tue Apr 15 20:46:23 2014 +0200
@@ -44,6 +44,7 @@
#include "runtime/java.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/copy.hpp"
+#include "utilities/globalDefinitions.hpp"
#include "utilities/stack.inline.hpp"
//
@@ -131,7 +132,7 @@
#ifndef PRODUCT
if (TraceScavenge) {
ResourceMark rm;
- gclog_or_tty->print_cr("KlassScanClosure::do_klass %p, %s, dirty: %s",
+ gclog_or_tty->print_cr("KlassScanClosure::do_klass " PTR_FORMAT ", %s, dirty: %s",
klass,
klass->external_name(),
klass->has_modified_oops() ? "true" : "false");