mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8039957: Replace the last few %p usages with PTR_FORMAT in the GC code
Reviewed-by: jwilhelm, sjohanss, jmasa
This commit is contained in:
parent
bacf6d7233
commit
a97ce35fab
6 changed files with 12 additions and 8 deletions
|
@ -57,6 +57,7 @@
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "oops/oop.pcgc.inline.hpp"
|
#include "oops/oop.pcgc.inline.hpp"
|
||||||
#include "runtime/vmThread.hpp"
|
#include "runtime/vmThread.hpp"
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "utilities/ticks.hpp"
|
#include "utilities/ticks.hpp"
|
||||||
|
|
||||||
size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
|
size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
|
||||||
|
@ -3222,7 +3223,7 @@ class VerifyKlassClosure: public KlassClosure {
|
||||||
_young_ref_counter_closure.reset_count();
|
_young_ref_counter_closure.reset_count();
|
||||||
k->oops_do(&_young_ref_counter_closure);
|
k->oops_do(&_young_ref_counter_closure);
|
||||||
if (_young_ref_counter_closure.count() > 0) {
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "gc_implementation/g1/heapRegionRemSet.hpp"
|
#include "gc_implementation/g1/heapRegionRemSet.hpp"
|
||||||
#include "memory/iterator.hpp"
|
#include "memory/iterator.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "utilities/intHisto.hpp"
|
#include "utilities/intHisto.hpp"
|
||||||
|
|
||||||
#define CARD_REPEAT_HISTO 0
|
#define CARD_REPEAT_HISTO 0
|
||||||
|
@ -163,7 +164,7 @@ public:
|
||||||
void printCard(HeapRegion* card_region, size_t card_index,
|
void printCard(HeapRegion* card_region, size_t card_index,
|
||||||
HeapWord* card_start) {
|
HeapWord* card_start) {
|
||||||
gclog_or_tty->print_cr("T %u Region [" PTR_FORMAT ", " PTR_FORMAT ") "
|
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 ")",
|
"[" PTR_FORMAT ", " PTR_FORMAT ")",
|
||||||
_worker_i,
|
_worker_i,
|
||||||
card_region->bottom(), card_region->end(),
|
card_region->bottom(), card_region->end(),
|
||||||
|
|
|
@ -128,8 +128,6 @@ class ObjectStartArray : public CHeapObj<mtGC> {
|
||||||
// When doing MT offsets, we can't assert this.
|
// When doing MT offsets, we can't assert this.
|
||||||
//assert(offset > *block, "Found backwards allocation");
|
//assert(offset > *block, "Found backwards allocation");
|
||||||
*block = (jbyte)offset;
|
*block = (jbyte)offset;
|
||||||
|
|
||||||
// tty->print_cr("[%p]", p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optimized for finding the first object that crosses into
|
// Optimized for finding the first object that crosses into
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
#include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
|
||||||
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
||||||
#include "memory/iterator.hpp"
|
#include "memory/iterator.hpp"
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
|
||||||
inline void PSScavenge::save_to_space_top_before_gc() {
|
inline void PSScavenge::save_to_space_top_before_gc() {
|
||||||
ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
|
ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
|
||||||
|
@ -178,7 +179,7 @@ class PSScavengeKlassClosure: public KlassClosure {
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if (TraceScavenge) {
|
if (TraceScavenge) {
|
||||||
ResourceMark rm;
|
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,
|
||||||
klass->external_name(),
|
klass->external_name(),
|
||||||
klass->has_modified_oops() ? "true" : "false");
|
klass->has_modified_oops() ? "true" : "false");
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "memory/sharedHeap.hpp"
|
#include "memory/sharedHeap.hpp"
|
||||||
#include "oops/arrayOop.hpp"
|
#include "oops/arrayOop.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
|
||||||
ParGCAllocBuffer::ParGCAllocBuffer(size_t desired_plab_sz_) :
|
ParGCAllocBuffer::ParGCAllocBuffer(size_t desired_plab_sz_) :
|
||||||
_word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL),
|
_word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL),
|
||||||
|
@ -132,8 +133,9 @@ void PLABStats::adjust_desired_plab_sz(uint no_of_gc_workers) {
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
void ParGCAllocBuffer::print() {
|
void ParGCAllocBuffer::print() {
|
||||||
gclog_or_tty->print("parGCAllocBuffer: _bottom: %p _top: %p _end: %p _hard_end: %p"
|
gclog_or_tty->print("parGCAllocBuffer: _bottom: " PTR_FORMAT " _top: " PTR_FORMAT
|
||||||
"_retained: %c _retained_filler: [%p,%p)\n",
|
" _end: " PTR_FORMAT " _hard_end: " PTR_FORMAT " _retained: %c"
|
||||||
|
" _retained_filler: [" PTR_FORMAT "," PTR_FORMAT ")\n",
|
||||||
_bottom, _top, _end, _hard_end,
|
_bottom, _top, _end, _hard_end,
|
||||||
"FT"[_retained], _retained_filler.start(), _retained_filler.end());
|
"FT"[_retained], _retained_filler.start(), _retained_filler.end());
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
#include "runtime/thread.inline.hpp"
|
#include "runtime/thread.inline.hpp"
|
||||||
#include "utilities/copy.hpp"
|
#include "utilities/copy.hpp"
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
#include "utilities/stack.inline.hpp"
|
#include "utilities/stack.inline.hpp"
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -131,7 +132,7 @@ void KlassScanClosure::do_klass(Klass* klass) {
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if (TraceScavenge) {
|
if (TraceScavenge) {
|
||||||
ResourceMark rm;
|
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,
|
||||||
klass->external_name(),
|
klass->external_name(),
|
||||||
klass->has_modified_oops() ? "true" : "false");
|
klass->has_modified_oops() ? "true" : "false");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue