Skip to content

Commit

Permalink
8293304: Replace some usages of INTPTR_FORMAT with PTR_FORMAT
Browse files Browse the repository at this point in the history
Reviewed-by: kbarrett, coleenp
  • Loading branch information
stefank committed Sep 8, 2022
1 parent 98da03a commit 6bd2794
Show file tree
Hide file tree
Showing 41 changed files with 137 additions and 131 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/g1/g1CardTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ void G1CardTable::initialize(G1RegionToSpaceMapper* mapper) {
assert(byte_for(high_bound-1) <= &_byte_map[_last_valid_index], "Checking end of map");

log_trace(gc, barrier)("G1CardTable::G1CardTable: ");
log_trace(gc, barrier)(" &_byte_map[0]: " INTPTR_FORMAT " &_byte_map[_last_valid_index]: " INTPTR_FORMAT,
log_trace(gc, barrier)(" &_byte_map[0]: " PTR_FORMAT " &_byte_map[_last_valid_index]: " PTR_FORMAT,
p2i(&_byte_map[0]), p2i(&_byte_map[_last_valid_index]));
log_trace(gc, barrier)(" _byte_map_base: " INTPTR_FORMAT, p2i(_byte_map_base));
log_trace(gc, barrier)(" _byte_map_base: " PTR_FORMAT, p2i(_byte_map_base));
}

bool G1CardTable::is_in_young(const void* p) const {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2513,7 +2513,7 @@ class PrintRSetsClosure : public HeapRegionClosure {
if (occupied == 0) {
tty->print_cr(" RSet is empty");
} else {
tty->print_cr("hrrs " INTPTR_FORMAT, p2i(hrrs));
tty->print_cr("hrrs " PTR_FORMAT, p2i(hrrs));
}
tty->print_cr("----------");
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1HeapVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class VerifyReadyForArchivingRegionClosure : public HeapRegionClosure {
if (hr->is_humongous()) {
_has_humongous = true;
}
log_info(gc, region, cds)("HeapRegion " INTPTR_FORMAT " %s%s", p2i(hr->bottom()), hr->get_type_str(), hole);
log_info(gc, region, cds)("HeapRegion " PTR_FORMAT " %s%s", p2i(hr->bottom()), hr->get_type_str(), hole);
return false;
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/parallel/mutableSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void MutableSpace::print_short_on( outputStream* st) const {
void MutableSpace::print() const { print_on(tty); }
void MutableSpace::print_on(outputStream* st) const {
MutableSpace::print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT "," INTPTR_FORMAT "," INTPTR_FORMAT ")",
st->print_cr(" [" PTR_FORMAT "," PTR_FORMAT "," PTR_FORMAT ")",
p2i(bottom()), p2i(top()), p2i(end()));
}

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/parallel/psOldGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ void PSOldGen::print_on(outputStream* st) const {
st->print(" %-15s", name());
st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
capacity_in_bytes()/K, used_in_bytes()/K);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
st->print_cr(" [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT ")",
p2i(virtual_space()->low_boundary()),
p2i(virtual_space()->high()),
p2i(virtual_space()->high_boundary()));
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/serial/serialBlockOffsetTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ BlockOffsetSharedArray::BlockOffsetSharedArray(MemRegion reserved,
_offset_array = (u_char*)_vs.low_boundary();
resize(init_word_size);
log_trace(gc, bot)("BlockOffsetSharedArray::BlockOffsetSharedArray: ");
log_trace(gc, bot)(" rs.base(): " INTPTR_FORMAT " rs.size(): " INTPTR_FORMAT " rs end(): " INTPTR_FORMAT,
log_trace(gc, bot)(" rs.base(): " PTR_FORMAT " rs.size(): " SIZE_FORMAT_X_0 " rs end(): " PTR_FORMAT,
p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size()));
log_trace(gc, bot)(" _vs.low_boundary(): " INTPTR_FORMAT " _vs.high_boundary(): " INTPTR_FORMAT,
log_trace(gc, bot)(" _vs.low_boundary(): " PTR_FORMAT " _vs.high_boundary(): " PTR_FORMAT,
p2i(_vs.low_boundary()), p2i(_vs.high_boundary()));
}

Expand Down
16 changes: 8 additions & 8 deletions src/hotspot/share/gc/shared/cardTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ void CardTable::initialize() {
*guard_card = last_card;

log_trace(gc, barrier)("CardTable::CardTable: ");
log_trace(gc, barrier)(" &_byte_map[0]: " INTPTR_FORMAT " &_byte_map[_last_valid_index]: " INTPTR_FORMAT,
log_trace(gc, barrier)(" &_byte_map[0]: " PTR_FORMAT " &_byte_map[_last_valid_index]: " PTR_FORMAT,
p2i(&_byte_map[0]), p2i(&_byte_map[_last_valid_index]));
log_trace(gc, barrier)(" _byte_map_base: " INTPTR_FORMAT, p2i(_byte_map_base));
log_trace(gc, barrier)(" _byte_map_base: " PTR_FORMAT, p2i(_byte_map_base));
}

int CardTable::find_covering_region_by_base(HeapWord* base) {
Expand Down Expand Up @@ -330,13 +330,13 @@ void CardTable::resize_covered_region(MemRegion new_region) {
_covered[ind].set_word_size(new_region.word_size());

log_trace(gc, barrier)("CardTable::resize_covered_region: ");
log_trace(gc, barrier)(" _covered[%d].start(): " INTPTR_FORMAT " _covered[%d].last(): " INTPTR_FORMAT,
log_trace(gc, barrier)(" _covered[%d].start(): " PTR_FORMAT " _covered[%d].last(): " PTR_FORMAT,
ind, p2i(_covered[ind].start()), ind, p2i(_covered[ind].last()));
log_trace(gc, barrier)(" _committed[%d].start(): " INTPTR_FORMAT " _committed[%d].last(): " INTPTR_FORMAT,
log_trace(gc, barrier)(" _committed[%d].start(): " PTR_FORMAT " _committed[%d].last(): " PTR_FORMAT,
ind, p2i(_committed[ind].start()), ind, p2i(_committed[ind].last()));
log_trace(gc, barrier)(" byte_for(start): " INTPTR_FORMAT " byte_for(last): " INTPTR_FORMAT,
log_trace(gc, barrier)(" byte_for(start): " PTR_FORMAT " byte_for(last): " PTR_FORMAT,
p2i(byte_for(_covered[ind].start())), p2i(byte_for(_covered[ind].last())));
log_trace(gc, barrier)(" addr_for(start): " INTPTR_FORMAT " addr_for(last): " INTPTR_FORMAT,
log_trace(gc, barrier)(" addr_for(start): " PTR_FORMAT " addr_for(last): " PTR_FORMAT,
p2i(addr_for((CardValue*) _committed[ind].start())), p2i(addr_for((CardValue*) _committed[ind].last())));

// Touch the last card of the covered region to show that it
Expand Down Expand Up @@ -413,7 +413,7 @@ void CardTable::verify_region(MemRegion mr, CardValue val, bool val_equals) {
bool failed = (val_equals) ? (curr_val != val) : (curr_val == val);
if (failed) {
if (!failures) {
log_error(gc, verify)("== CT verification failed: [" INTPTR_FORMAT "," INTPTR_FORMAT "]", p2i(start), p2i(end));
log_error(gc, verify)("== CT verification failed: [" PTR_FORMAT "," PTR_FORMAT "]", p2i(start), p2i(end));
log_error(gc, verify)("== %sexpecting value: %d", (val_equals) ? "" : "not ", val);
failures = true;
}
Expand All @@ -436,6 +436,6 @@ void CardTable::verify_dirty_region(MemRegion mr) {
#endif

void CardTable::print_on(outputStream* st) const {
st->print_cr("Card table byte_map: [" INTPTR_FORMAT "," INTPTR_FORMAT "] _byte_map_base: " INTPTR_FORMAT,
st->print_cr("Card table byte_map: [" PTR_FORMAT "," PTR_FORMAT "] _byte_map_base: " PTR_FORMAT,
p2i(_byte_map), p2i(_byte_map + _byte_map_size), p2i(_byte_map_base));
}
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shared/gcLocker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void GCLocker::verify_critical_count() {
jtiwh.rewind();
for (; JavaThread *thr = jtiwh.next(); ) {
if (thr->in_critical()) {
log_error(gc, verify)(INTPTR_FORMAT " in_critical %d", p2i(thr), thr->in_critical());
log_error(gc, verify)(PTR_FORMAT " in_critical %d", p2i(thr), thr->in_critical());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shared/genCollectedHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ void GenCollectedHeap::do_full_collection(bool clear_all_soft_refs,
bool GenCollectedHeap::is_in_young(const void* p) const {
bool result = p < _old_gen->reserved().start();
assert(result == _young_gen->is_in_reserved(p),
"incorrect test - result=%d, p=" INTPTR_FORMAT, result, p2i((void*)p));
"incorrect test - result=%d, p=" PTR_FORMAT, result, p2i(p));
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shared/generation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void Generation::print_on(outputStream* st) const {
st->print(" %-20s", name());
st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
capacity()/K, used()/K);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
st->print_cr(" [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT ")",
p2i(_virtual_space.low_boundary()),
p2i(_virtual_space.high()),
p2i(_virtual_space.high_boundary()));
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/shared/locationPrinter.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ bool BlockLocationPrinter<CollectedHeapT>::print_location(outputStream* st, void
oop o = base_oop_or_null(addr);
if (o != NULL) {
if ((void*)o == addr) {
st->print(INTPTR_FORMAT " is an oop: ", p2i(addr));
st->print(PTR_FORMAT " is an oop: ", p2i(addr));
} else {
st->print(INTPTR_FORMAT " is pointing into object: " , p2i(addr));
st->print(PTR_FORMAT " is pointing into object: " , p2i(addr));
}
o->print_on(st);
return true;
}
} else if (CollectedHeapT::heap()->is_in_reserved(addr)) {
st->print_cr(INTPTR_FORMAT " is an unallocated location in the heap", p2i(addr));
st->print_cr(PTR_FORMAT " is an unallocated location in the heap", p2i(addr));
return true;
}

Expand Down
18 changes: 9 additions & 9 deletions src/hotspot/share/gc/shared/referenceProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ inline void log_dropped_ref(const DiscoveredListIterator& iter, const char* reas
inline void log_enqueued_ref(const DiscoveredListIterator& iter, const char* reason) {
if (log_develop_is_enabled(Trace, gc, ref)) {
ResourceMark rm;
log_develop_trace(gc, ref)("Enqueue %s reference (" INTPTR_FORMAT ": %s)",
log_develop_trace(gc, ref)("Enqueue %s reference (" PTR_FORMAT ": %s)",
reason, p2i(iter.obj()), iter.obj()->klass()->internal_name());
}
assert(oopDesc::is_oop(iter.obj()), "Adding a bad reference");
Expand Down Expand Up @@ -371,7 +371,7 @@ size_t ReferenceProcessor::process_discovered_list_work(DiscoveredList& refs_
}

log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " active Refs out of " SIZE_FORMAT
" Refs in discovered list " INTPTR_FORMAT,
" Refs in discovered list " PTR_FORMAT,
iter.removed(), iter.processed(), p2i(&refs_list));
return iter.removed();
}
Expand Down Expand Up @@ -845,7 +845,7 @@ inline DiscoveredList* ReferenceProcessor::get_discovered_list(ReferenceType rt)
default:
ShouldNotReachHere();
}
log_develop_trace(gc, ref)("Thread %d gets list " INTPTR_FORMAT, id, p2i(list));
log_develop_trace(gc, ref)("Thread %d gets list " PTR_FORMAT, id, p2i(list));
return list;
}

Expand All @@ -867,10 +867,10 @@ inline void ReferenceProcessor::add_to_discovered_list(DiscoveredList& refs_list
// We can always add the object without synchronization: every thread has its
// own list head.
refs_list.add_as_head(obj);
log_develop_trace(gc, ref)("Discovered reference (%s) (" INTPTR_FORMAT ": %s)",
log_develop_trace(gc, ref)("Discovered reference (%s) (" PTR_FORMAT ": %s)",
discovery_is_mt() ? "mt" : "st", p2i(obj), obj->klass()->internal_name());
} else {
log_develop_trace(gc, ref)("Already discovered reference (mt) (" INTPTR_FORMAT ": %s)",
log_develop_trace(gc, ref)("Already discovered reference (mt) (" PTR_FORMAT ": %s)",
p2i(obj), obj->klass()->internal_name());
}
}
Expand Down Expand Up @@ -913,8 +913,8 @@ void ReferenceProcessor::verify_referent(oop obj) {
bool concurrent = discovery_is_concurrent();
oop referent = java_lang_ref_Reference::unknown_referent_no_keepalive(obj);
assert(concurrent ? oopDesc::is_oop_or_null(referent) : oopDesc::is_oop(referent),
"Bad referent " INTPTR_FORMAT " found in Reference "
INTPTR_FORMAT " during %sconcurrent discovery ",
"Bad referent " PTR_FORMAT " found in Reference "
PTR_FORMAT " during %sconcurrent discovery ",
p2i(referent), p2i(obj), concurrent ? "" : "non-");
}
#endif
Expand Down Expand Up @@ -997,7 +997,7 @@ bool ReferenceProcessor::discover_reference(oop obj, ReferenceType rt) {
assert(oopDesc::is_oop_or_null(discovered), "Expected an oop or NULL for discovered field at " PTR_FORMAT, p2i(discovered));
if (discovered != NULL) {
// The reference has already been discovered...
log_develop_trace(gc, ref)("Already discovered reference (" INTPTR_FORMAT ": %s)",
log_develop_trace(gc, ref)("Already discovered reference (" PTR_FORMAT ": %s)",
p2i(obj), obj->klass()->internal_name());
if (RefDiscoveryPolicy == ReferentBasedDiscovery) {
// assumes that an object is not processed twice;
Expand Down Expand Up @@ -1139,7 +1139,7 @@ bool ReferenceProcessor::preclean_discovered_reflist(DiscoveredList& refs_lis
}

if (iter.processed() > 0) {
log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " Refs out of " SIZE_FORMAT " Refs in discovered list " INTPTR_FORMAT,
log_develop_trace(gc, ref)(" Dropped " SIZE_FORMAT " Refs out of " SIZE_FORMAT " Refs in discovered list " PTR_FORMAT,
iter.removed(), iter.processed(), p2i(&refs_list));
}
return false;
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/share/gc/shared/space.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,21 +585,21 @@ void Space::print() const { print_on(tty); }

void Space::print_on(outputStream* st) const {
print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ")",
st->print_cr(" [" PTR_FORMAT ", " PTR_FORMAT ")",
p2i(bottom()), p2i(end()));
}

void ContiguousSpace::print_on(outputStream* st) const {
print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
st->print_cr(" [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT ")",
p2i(bottom()), p2i(top()), p2i(end()));
}

#if INCLUDE_SERIALGC
void OffsetTableContigSpace::print_on(outputStream* st) const {
print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", "
INTPTR_FORMAT ", " INTPTR_FORMAT ")",
st->print_cr(" [" PTR_FORMAT ", " PTR_FORMAT ", "
PTR_FORMAT ", " PTR_FORMAT ")",
p2i(bottom()), p2i(top()), p2i(_offsets.threshold()), p2i(end()));
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void ThreadLocalAllocBuffer::resize() {

size_t aligned_new_size = align_object_size(new_size);

log_trace(gc, tlab)("TLAB new size: thread: " INTPTR_FORMAT " [id: %2d]"
log_trace(gc, tlab)("TLAB new size: thread: " PTR_FORMAT " [id: %2d]"
" refills %d alloc: %8.6f desired_size: " SIZE_FORMAT " -> " SIZE_FORMAT,
p2i(thread()), thread()->osthread()->thread_id(),
_target_refills, _allocation_fraction.average(), desired_size(), aligned_new_size);
Expand Down Expand Up @@ -296,7 +296,7 @@ void ThreadLocalAllocBuffer::print_stats(const char* tag) {
size_t waste = _gc_waste + _refill_waste;
double waste_percent = percent_of(waste, _allocated_size);
size_t tlab_used = Universe::heap()->tlab_used(thrd);
log.trace("TLAB: %s thread: " INTPTR_FORMAT " [id: %2d]"
log.trace("TLAB: %s thread: " PTR_FORMAT " [id: %2d]"
" desired_size: " SIZE_FORMAT "KB"
" slow allocs: %d refill waste: " SIZE_FORMAT "B"
" alloc:%8.5f %8.0fKB refills: %d waste %4.1f%% gc: %dB"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void ThreadLocalAllocBuffer::record_slow_allocation(size_t obj_size) {

_slow_allocations++;

log_develop_trace(gc, tlab)("TLAB: %s thread: " INTPTR_FORMAT " [id: %2d]"
log_develop_trace(gc, tlab)("TLAB: %s thread: " PTR_FORMAT " [id: %2d]"
" obj: " SIZE_FORMAT
" free: " SIZE_FORMAT
" waste: " SIZE_FORMAT,
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/memory/allocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bool MetaspaceObj::is_valid(const MetaspaceObj* p) {
}

void MetaspaceObj::print_address_on(outputStream* st) const {
st->print(" {" INTPTR_FORMAT "}", p2i(this));
st->print(" {" PTR_FORMAT "}", p2i(this));
}

void* ResourceObj::operator new(size_t size, Arena *arena) throw() {
Expand Down Expand Up @@ -160,7 +160,7 @@ void ResourceObj::operator delete(void* p) {
void ResourceObj::set_allocation_type(address res, allocation_type type) {
// Set allocation type in the resource object
uintptr_t allocation = (uintptr_t)res;
assert((allocation & allocation_mask) == 0, "address should be aligned to 4 bytes at least: " INTPTR_FORMAT, p2i(res));
assert((allocation & allocation_mask) == 0, "address should be aligned to 4 bytes at least: " PTR_FORMAT, p2i(res));
assert(type <= allocation_mask, "incorrect allocation type");
ResourceObj* resobj = (ResourceObj *)res;
resobj->_allocation_t[0] = ~(allocation + type);
Expand Down Expand Up @@ -242,7 +242,7 @@ ResourceObj::~ResourceObj() {
void ResourceObj::print() const { print_on(tty); }

void ResourceObj::print_on(outputStream* st) const {
st->print_cr("ResourceObj(" INTPTR_FORMAT ")", p2i(this));
st->print_cr("ResourceObj(" PTR_FORMAT ")", p2i(this));
}

ReallocMark::ReallocMark() {
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/memory/heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ void* CodeHeap::allocate(size_t instance_size) {
if (block != NULL) {
assert(!block->free(), "must not be marked free");
guarantee((char*) block >= _memory.low_boundary() && (char*) block < _memory.high(),
"The newly allocated block " INTPTR_FORMAT " is not within the heap "
"starting with " INTPTR_FORMAT " and ending with " INTPTR_FORMAT,
"The newly allocated block " PTR_FORMAT " is not within the heap "
"starting with " PTR_FORMAT " and ending with " PTR_FORMAT,
p2i(block), p2i(_memory.low_boundary()), p2i(_memory.high()));
_max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity());
_blob_count++;
Expand All @@ -305,8 +305,8 @@ void* CodeHeap::allocate(size_t instance_size) {
block->initialize(number_of_segments);
_next_segment += number_of_segments;
guarantee((char*) block >= _memory.low_boundary() && (char*) block < _memory.high(),
"The newly allocated block " INTPTR_FORMAT " is not within the heap "
"starting with " INTPTR_FORMAT " and ending with " INTPTR_FORMAT,
"The newly allocated block " PTR_FORMAT " is not within the heap "
"starting with " PTR_FORMAT " and ending with " PTR_FORMAT,
p2i(block), p2i(_memory.low_boundary()), p2i(_memory.high()));
_max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity());
_blob_count++;
Expand Down Expand Up @@ -367,8 +367,8 @@ void CodeHeap::deallocate(void* p) {
HeapBlock* b = (((HeapBlock *)p) - 1);
assert(b->allocated_space() == p, "sanity check");
guarantee((char*) b >= _memory.low_boundary() && (char*) b < _memory.high(),
"The block to be deallocated " INTPTR_FORMAT " is not within the heap "
"starting with " INTPTR_FORMAT " and ending with " INTPTR_FORMAT,
"The block to be deallocated " PTR_FORMAT " is not within the heap "
"starting with " PTR_FORMAT " and ending with " PTR_FORMAT,
p2i(b), p2i(_memory.low_boundary()), p2i(_memory.high()));
add_to_freelist(b);
NOT_PRODUCT(verify());
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/memory/heapInspection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static void print_classname(outputStream* st, Klass* klass) {
if (loader_oop == NULL) {
st->print("null");
} else {
st->print(INTPTR_FORMAT, p2i(klass->class_loader_data()));
st->print(PTR_FORMAT, p2i(klass->class_loader_data()));
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/memory/virtualspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,8 @@ void VirtualSpace::print_on(outputStream* out) const {
out->cr();
out->print_cr(" - committed: " SIZE_FORMAT, committed_size());
out->print_cr(" - reserved: " SIZE_FORMAT, reserved_size());
out->print_cr(" - [low, high]: [" INTPTR_FORMAT ", " INTPTR_FORMAT "]", p2i(low()), p2i(high()));
out->print_cr(" - [low_b, high_b]: [" INTPTR_FORMAT ", " INTPTR_FORMAT "]", p2i(low_boundary()), p2i(high_boundary()));
out->print_cr(" - [low, high]: [" PTR_FORMAT ", " PTR_FORMAT "]", p2i(low()), p2i(high()));
out->print_cr(" - [low_b, high_b]: [" PTR_FORMAT ", " PTR_FORMAT "]", p2i(low_boundary()), p2i(high_boundary()));
}

void VirtualSpace::print() const {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/annotations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void Annotations::metaspace_pointers_do(MetaspaceClosure* it) {
}

void Annotations::print_value_on(outputStream* st) const {
st->print("Annotations(" INTPTR_FORMAT ")", p2i(this));
st->print("Annotations(" PTR_FORMAT ")", p2i(this));
}

#define BULLET " - "
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Array: public MetaspaceObj {

// FIXME: How to handle this?
void print_value_on(outputStream* st) const {
st->print("Array<T>(" INTPTR_FORMAT ")", p2i(this));
st->print("Array<T>(" PTR_FORMAT ")", p2i(this));
}

#ifndef PRODUCT
Expand Down

1 comment on commit 6bd2794

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.