8293304: Replace some usages of INTPTR_FORMAT with PTR_FORMAT
Reviewed-by: kbarrett, coleenp
This commit is contained in:
parent
98da03af50
commit
6bd2794175
@ -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 {
|
||||
|
@ -2513,7 +2513,7 @@ public:
|
||||
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;
|
||||
|
@ -305,7 +305,7 @@ public:
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
@ -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()));
|
||||
}
|
||||
|
||||
|
@ -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()));
|
||||
|
@ -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()));
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
@ -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
|
||||
@ -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;
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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()));
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
@ -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();
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
@ -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;
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
@ -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"
|
||||
|
@ -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,
|
||||
|
@ -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() {
|
||||
@ -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);
|
||||
@ -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() {
|
||||
|
@ -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++;
|
||||
@ -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++;
|
||||
@ -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());
|
||||
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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 " - "
|
||||
|
@ -148,7 +148,7 @@ protected:
|
||||
|
||||
// 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
|
||||
|
@ -54,8 +54,8 @@ inline oop CompressedOops::decode_raw(narrowOop v) {
|
||||
inline oop CompressedOops::decode_not_null(narrowOop v) {
|
||||
assert(!is_null(v), "narrow oop value can never be zero");
|
||||
oop result = decode_raw(v);
|
||||
assert(is_object_aligned(result), "address not aligned: " INTPTR_FORMAT, p2i((void*) result));
|
||||
assert(Universe::is_in_heap(result), "object not in heap " PTR_FORMAT, p2i((void*) result));
|
||||
assert(is_object_aligned(result), "address not aligned: " PTR_FORMAT, p2i(result));
|
||||
assert(Universe::is_in_heap(result), "object not in heap " PTR_FORMAT, p2i(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -65,8 +65,8 @@ inline oop CompressedOops::decode(narrowOop v) {
|
||||
|
||||
inline narrowOop CompressedOops::encode_not_null(oop v) {
|
||||
assert(!is_null(v), "oop value can never be zero");
|
||||
assert(is_object_aligned(v), "address not aligned: " PTR_FORMAT, p2i((void*)v));
|
||||
assert(is_in(v), "address not in heap range: " PTR_FORMAT, p2i((void*)v));
|
||||
assert(is_object_aligned(v), "address not aligned: " PTR_FORMAT, p2i(v));
|
||||
assert(is_in(v), "address not in heap range: " PTR_FORMAT, p2i(v));
|
||||
uint64_t pd = (uint64_t)(pointer_delta((void*)v, (void*)base(), 1));
|
||||
assert(OopEncodingHeapMax > pd, "change encoding max if new encoding");
|
||||
narrowOop result = narrow_oop_cast(pd >> shift());
|
||||
@ -79,12 +79,12 @@ inline narrowOop CompressedOops::encode(oop v) {
|
||||
}
|
||||
|
||||
inline oop CompressedOops::decode_not_null(oop v) {
|
||||
assert(Universe::is_in_heap(v), "object not in heap " PTR_FORMAT, p2i((void*) v));
|
||||
assert(Universe::is_in_heap(v), "object not in heap " PTR_FORMAT, p2i(v));
|
||||
return v;
|
||||
}
|
||||
|
||||
inline oop CompressedOops::decode(oop v) {
|
||||
assert(Universe::is_in_heap_or_null(v), "object not in heap " PTR_FORMAT, p2i((void*) v));
|
||||
assert(Universe::is_in_heap_or_null(v), "object not in heap " PTR_FORMAT, p2i(v));
|
||||
return v;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ inline Klass* CompressedKlassPointers::decode_raw(narrowKlass v) {
|
||||
}
|
||||
|
||||
inline Klass* CompressedKlassPointers::decode_raw(narrowKlass v, address narrow_base) {
|
||||
return (Klass*)(void*)((uintptr_t)narrow_base +((uintptr_t)v << shift()));
|
||||
return (Klass*)((uintptr_t)narrow_base +((uintptr_t)v << shift()));
|
||||
}
|
||||
|
||||
inline Klass* CompressedKlassPointers::decode_not_null(narrowKlass v) {
|
||||
@ -132,7 +132,7 @@ inline Klass* CompressedKlassPointers::decode_not_null(narrowKlass v) {
|
||||
inline Klass* CompressedKlassPointers::decode_not_null(narrowKlass v, address narrow_base) {
|
||||
assert(!is_null(v), "narrow klass value can never be zero");
|
||||
Klass* result = decode_raw(v, narrow_base);
|
||||
assert(check_alignment(result), "address not aligned: " INTPTR_FORMAT, p2i((void*) result));
|
||||
assert(check_alignment(result), "address not aligned: " PTR_FORMAT, p2i(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ inline narrowKlass CompressedKlassPointers::encode_not_null(Klass* v) {
|
||||
inline narrowKlass CompressedKlassPointers::encode_not_null(Klass* v, address narrow_base) {
|
||||
assert(!is_null(v), "klass value can never be zero");
|
||||
assert(check_alignment(v), "Address not aligned");
|
||||
uint64_t pd = (uint64_t)(pointer_delta((void*)v, narrow_base, 1));
|
||||
uint64_t pd = (uint64_t)(pointer_delta(v, narrow_base, 1));
|
||||
assert(KlassEncodingMetaspaceMax > pd, "change encoding max if new encoding");
|
||||
uint64_t result = pd >> shift();
|
||||
assert((result & CONST64(0xffffffff00000000)) == 0, "narrow klass pointer overflow");
|
||||
|
@ -431,7 +431,7 @@ void ConstMethod::print_on(outputStream* st) const {
|
||||
ResourceMark rm;
|
||||
st->print_cr("%s", internal_name());
|
||||
Method* m = method();
|
||||
st->print(" - method: " INTPTR_FORMAT " ", p2i((address)m));
|
||||
st->print(" - method: " PTR_FORMAT " ", p2i(m));
|
||||
if (m != NULL) {
|
||||
m->print_value_on(st);
|
||||
}
|
||||
|
@ -2268,12 +2268,12 @@ void ConstantPool::print_on(outputStream* st) const {
|
||||
st->cr();
|
||||
}
|
||||
if (pool_holder() != NULL) {
|
||||
st->print_cr(" - holder: " INTPTR_FORMAT, p2i(pool_holder()));
|
||||
st->print_cr(" - holder: " PTR_FORMAT, p2i(pool_holder()));
|
||||
}
|
||||
st->print_cr(" - cache: " INTPTR_FORMAT, p2i(cache()));
|
||||
st->print_cr(" - resolved_references: " INTPTR_FORMAT, p2i(resolved_references_or_null()));
|
||||
st->print_cr(" - reference_map: " INTPTR_FORMAT, p2i(reference_map()));
|
||||
st->print_cr(" - resolved_klasses: " INTPTR_FORMAT, p2i(resolved_klasses()));
|
||||
st->print_cr(" - cache: " PTR_FORMAT, p2i(cache()));
|
||||
st->print_cr(" - resolved_references: " PTR_FORMAT, p2i(resolved_references_or_null()));
|
||||
st->print_cr(" - reference_map: " PTR_FORMAT, p2i(reference_map()));
|
||||
st->print_cr(" - resolved_klasses: " PTR_FORMAT, p2i(resolved_klasses()));
|
||||
st->print_cr(" - cp length: %d", length());
|
||||
|
||||
for (int index = 1; index < length(); index++) { // Index 0 is unused
|
||||
|
@ -1355,7 +1355,7 @@ instanceOop InstanceKlass::register_finalizer(instanceOop i, TRAPS) {
|
||||
if (TraceFinalizerRegistration) {
|
||||
tty->print("Registered ");
|
||||
i->print_value_on(tty);
|
||||
tty->print_cr(" (" INTPTR_FORMAT ") as finalizable", p2i(i));
|
||||
tty->print_cr(" (" PTR_FORMAT ") as finalizable", p2i(i));
|
||||
}
|
||||
instanceHandle h_i(THREAD, i);
|
||||
// Pass the handle as argument, JavaCalls::call expects oop as jobjects
|
||||
@ -1475,7 +1475,7 @@ void InstanceKlass::call_class_initializer(TRAPS) {
|
||||
LogStream ls(lt);
|
||||
ls.print("%d Initializing ", call_class_initializer_counter++);
|
||||
name()->print_value_on(&ls);
|
||||
ls.print_cr("%s (" INTPTR_FORMAT ")", h_method() == NULL ? "(no method)" : "", p2i(this));
|
||||
ls.print_cr("%s (" PTR_FORMAT ")", h_method() == NULL ? "(no method)" : "", p2i(this));
|
||||
}
|
||||
if (h_method() != NULL) {
|
||||
JavaCallArguments args; // No arguments
|
||||
@ -2040,7 +2040,7 @@ PrintClassClosure::PrintClassClosure(outputStream* st, bool verbose)
|
||||
void PrintClassClosure::do_klass(Klass* k) {
|
||||
ResourceMark rm;
|
||||
// klass pointer
|
||||
_st->print(INTPTR_FORMAT " ", p2i(k));
|
||||
_st->print(PTR_FORMAT " ", p2i(k));
|
||||
// klass size
|
||||
_st->print("%4d ", k->size());
|
||||
// initialization state
|
||||
@ -2675,7 +2675,7 @@ void InstanceKlass::unload_class(InstanceKlass* ik) {
|
||||
|
||||
if (log_is_enabled(Info, class, unload)) {
|
||||
ResourceMark rm;
|
||||
log_info(class, unload)("unloading class %s " INTPTR_FORMAT, ik->external_name(), p2i(ik));
|
||||
log_info(class, unload)("unloading class %s " PTR_FORMAT, ik->external_name(), p2i(ik));
|
||||
}
|
||||
|
||||
Events::log_class_unloading(Thread::current(), ik);
|
||||
@ -3504,9 +3504,9 @@ void InstanceKlass::print_on(outputStream* st) const {
|
||||
} else {
|
||||
st->print_cr(BULLET"java mirror: NULL");
|
||||
}
|
||||
st->print(BULLET"vtable length %d (start addr: " INTPTR_FORMAT ")", vtable_length(), p2i(start_of_vtable())); st->cr();
|
||||
st->print(BULLET"vtable length %d (start addr: " PTR_FORMAT ")", vtable_length(), p2i(start_of_vtable())); st->cr();
|
||||
if (vtable_length() > 0 && (Verbose || WizardMode)) print_vtable(start_of_vtable(), vtable_length(), st);
|
||||
st->print(BULLET"itable length %d (start addr: " INTPTR_FORMAT ")", itable_length(), p2i(start_of_itable())); st->cr();
|
||||
st->print(BULLET"itable length %d (start addr: " PTR_FORMAT ")", itable_length(), p2i(start_of_itable())); st->cr();
|
||||
if (itable_length() > 0 && (Verbose || WizardMode)) print_vtable(start_of_itable(), itable_length(), st);
|
||||
st->print_cr(BULLET"---- static fields (%d words):", static_field_size());
|
||||
FieldPrinter print_static_field(st);
|
||||
@ -3713,7 +3713,7 @@ void InstanceKlass::print_class_load_logging(ClassLoaderData* loader_data,
|
||||
stringStream debug_stream;
|
||||
|
||||
// Class hierarchy info
|
||||
debug_stream.print(" klass: " INTPTR_FORMAT " super: " INTPTR_FORMAT,
|
||||
debug_stream.print(" klass: " PTR_FORMAT " super: " PTR_FORMAT,
|
||||
p2i(this), p2i(superklass()));
|
||||
|
||||
// Interfaces
|
||||
@ -3721,7 +3721,7 @@ void InstanceKlass::print_class_load_logging(ClassLoaderData* loader_data,
|
||||
debug_stream.print(" interfaces:");
|
||||
int length = local_interfaces()->length();
|
||||
for (int i = 0; i < length; i++) {
|
||||
debug_stream.print(" " INTPTR_FORMAT,
|
||||
debug_stream.print(" " PTR_FORMAT,
|
||||
p2i(InstanceKlass::cast(local_interfaces()->at(i))));
|
||||
}
|
||||
}
|
||||
@ -4004,7 +4004,7 @@ void InstanceKlass::purge_previous_version_list() {
|
||||
// The previous version InstanceKlass is on the ClassLoaderData deallocate list
|
||||
// so will be deallocated during the next phase of class unloading.
|
||||
log_trace(redefine, class, iklass, purge)
|
||||
("previous version " INTPTR_FORMAT " is dead.", p2i(pv_node));
|
||||
("previous version " PTR_FORMAT " is dead.", p2i(pv_node));
|
||||
// Unlink from previous version list.
|
||||
assert(pv_node->class_loader_data() == loader_data, "wrong loader_data");
|
||||
InstanceKlass* next = pv_node->previous_versions();
|
||||
@ -4018,7 +4018,7 @@ void InstanceKlass::purge_previous_version_list() {
|
||||
version++;
|
||||
continue;
|
||||
} else {
|
||||
log_trace(redefine, class, iklass, purge)("previous version " INTPTR_FORMAT " is alive", p2i(pv_node));
|
||||
log_trace(redefine, class, iklass, purge)("previous version " PTR_FORMAT " is alive", p2i(pv_node));
|
||||
assert(pvcp->pool_holder() != NULL, "Constant pool with no holder");
|
||||
guarantee (!loader_data->is_unloading(), "unloaded classes can't be on the stack");
|
||||
live_count++;
|
||||
|
@ -216,7 +216,7 @@ public:
|
||||
template <ChunkFrames frame_kind, typename RegisterMapT>
|
||||
bool do_frame(const StackChunkFrameStream<frame_kind>& fs, const RegisterMapT* map) {
|
||||
frame f = fs.to_frame();
|
||||
_st->print_cr("-- frame sp: " INTPTR_FORMAT " interpreted: %d size: %d argsize: %d",
|
||||
_st->print_cr("-- frame sp: " PTR_FORMAT " interpreted: %d size: %d argsize: %d",
|
||||
p2i(fs.sp()), fs.is_interpreted(), f.frame_size(),
|
||||
fs.is_interpreted() ? 0 : f.compiled_frame_stack_argsize());
|
||||
#ifdef ASSERT
|
||||
@ -239,17 +239,17 @@ void InstanceStackChunkKlass::print_chunk(const stackChunkOop c, bool verbose, o
|
||||
return;
|
||||
}
|
||||
|
||||
st->print_cr("CHUNK " INTPTR_FORMAT " " INTPTR_FORMAT " - " INTPTR_FORMAT " :: " INTPTR_FORMAT,
|
||||
p2i((oopDesc*)c), p2i(c->start_address()), p2i(c->end_address()), c->identity_hash());
|
||||
st->print_cr(" barriers: %d gc_mode: %d bitmap: %d parent: " INTPTR_FORMAT,
|
||||
c->requires_barriers(), c->is_gc_mode(), c->has_bitmap(), p2i((oopDesc*)c->parent()));
|
||||
st->print_cr("CHUNK " PTR_FORMAT " " PTR_FORMAT " - " PTR_FORMAT " :: " INTPTR_FORMAT,
|
||||
p2i(c), p2i(c->start_address()), p2i(c->end_address()), c->identity_hash());
|
||||
st->print_cr(" barriers: %d gc_mode: %d bitmap: %d parent: " PTR_FORMAT,
|
||||
c->requires_barriers(), c->is_gc_mode(), c->has_bitmap(), p2i(c->parent()));
|
||||
st->print_cr(" flags mixed: %d", c->has_mixed_frames());
|
||||
st->print_cr(" size: %d argsize: %d max_size: %d sp: %d pc: " INTPTR_FORMAT,
|
||||
st->print_cr(" size: %d argsize: %d max_size: %d sp: %d pc: " PTR_FORMAT,
|
||||
c->stack_size(), c->argsize(), c->max_thawing_size(), c->sp(), p2i(c->pc()));
|
||||
|
||||
if (verbose) {
|
||||
st->cr();
|
||||
st->print_cr("------ chunk frames end: " INTPTR_FORMAT, p2i(c->bottom_address()));
|
||||
st->print_cr("------ chunk frames end: " PTR_FORMAT, p2i(c->bottom_address()));
|
||||
PrintStackChunkClosure closure(st);
|
||||
c->iterate_stack(&closure);
|
||||
st->print_cr("------");
|
||||
|
@ -332,7 +332,7 @@ int Method::bci_from(address bcp) const {
|
||||
// Do not have a ResourceMark here because AsyncGetCallTrace stack walking code
|
||||
// may call this after interrupting a nested ResourceMark.
|
||||
assert(is_native() && bcp == code_base() || contains(bcp) || VMError::is_error_reported(),
|
||||
"bcp doesn't belong to this method. bcp: " INTPTR_FORMAT, p2i(bcp));
|
||||
"bcp doesn't belong to this method. bcp: " PTR_FORMAT, p2i(bcp));
|
||||
|
||||
return bcp - code_base();
|
||||
}
|
||||
@ -2347,9 +2347,9 @@ void Method::print_on(outputStream* st) const {
|
||||
ResourceMark rm;
|
||||
assert(is_method(), "must be method");
|
||||
st->print_cr("%s", internal_name());
|
||||
st->print_cr(" - this oop: " INTPTR_FORMAT, p2i(this));
|
||||
st->print_cr(" - this oop: " PTR_FORMAT, p2i(this));
|
||||
st->print (" - method holder: "); method_holder()->print_value_on(st); st->cr();
|
||||
st->print (" - constants: " INTPTR_FORMAT " ", p2i(constants()));
|
||||
st->print (" - constants: " PTR_FORMAT " ", p2i(constants()));
|
||||
constants()->print_value_on(st); st->cr();
|
||||
st->print (" - access: 0x%x ", access_flags().as_int()); access_flags().print_on(st); st->cr();
|
||||
st->print (" - name: "); name()->print_value_on(st); st->cr();
|
||||
@ -2363,26 +2363,26 @@ void Method::print_on(outputStream* st) const {
|
||||
if (highest_comp_level() != CompLevel_none)
|
||||
st->print_cr(" - highest level: %d", highest_comp_level());
|
||||
st->print_cr(" - vtable index: %d", _vtable_index);
|
||||
st->print_cr(" - i2i entry: " INTPTR_FORMAT, p2i(interpreter_entry()));
|
||||
st->print_cr(" - i2i entry: " PTR_FORMAT, p2i(interpreter_entry()));
|
||||
st->print( " - adapters: ");
|
||||
AdapterHandlerEntry* a = ((Method*)this)->adapter();
|
||||
if (a == NULL)
|
||||
st->print_cr(INTPTR_FORMAT, p2i(a));
|
||||
st->print_cr(PTR_FORMAT, p2i(a));
|
||||
else
|
||||
a->print_adapter_on(st);
|
||||
st->print_cr(" - compiled entry " INTPTR_FORMAT, p2i(from_compiled_entry()));
|
||||
st->print_cr(" - compiled entry " PTR_FORMAT, p2i(from_compiled_entry()));
|
||||
st->print_cr(" - code size: %d", code_size());
|
||||
if (code_size() != 0) {
|
||||
st->print_cr(" - code start: " INTPTR_FORMAT, p2i(code_base()));
|
||||
st->print_cr(" - code end (excl): " INTPTR_FORMAT, p2i(code_base() + code_size()));
|
||||
st->print_cr(" - code start: " PTR_FORMAT, p2i(code_base()));
|
||||
st->print_cr(" - code end (excl): " PTR_FORMAT, p2i(code_base() + code_size()));
|
||||
}
|
||||
if (method_data() != NULL) {
|
||||
st->print_cr(" - method data: " INTPTR_FORMAT, p2i(method_data()));
|
||||
st->print_cr(" - method data: " PTR_FORMAT, p2i(method_data()));
|
||||
}
|
||||
st->print_cr(" - checked ex length: %d", checked_exceptions_length());
|
||||
if (checked_exceptions_length() > 0) {
|
||||
CheckedExceptionElement* table = checked_exceptions_start();
|
||||
st->print_cr(" - checked ex start: " INTPTR_FORMAT, p2i(table));
|
||||
st->print_cr(" - checked ex start: " PTR_FORMAT, p2i(table));
|
||||
if (Verbose) {
|
||||
for (int i = 0; i < checked_exceptions_length(); i++) {
|
||||
st->print_cr(" - throws %s", constants()->printable_name_at(table[i].class_cp_index));
|
||||
@ -2391,7 +2391,7 @@ void Method::print_on(outputStream* st) const {
|
||||
}
|
||||
if (has_linenumber_table()) {
|
||||
u_char* table = compressed_linenumber_table();
|
||||
st->print_cr(" - linenumber start: " INTPTR_FORMAT, p2i(table));
|
||||
st->print_cr(" - linenumber start: " PTR_FORMAT, p2i(table));
|
||||
if (Verbose) {
|
||||
CompressedLineNumberReadStream stream(table);
|
||||
while (stream.read_pair()) {
|
||||
@ -2402,7 +2402,7 @@ void Method::print_on(outputStream* st) const {
|
||||
st->print_cr(" - localvar length: %d", localvariable_table_length());
|
||||
if (localvariable_table_length() > 0) {
|
||||
LocalVariableTableElement* table = localvariable_table_start();
|
||||
st->print_cr(" - localvar start: " INTPTR_FORMAT, p2i(table));
|
||||
st->print_cr(" - localvar start: " PTR_FORMAT, p2i(table));
|
||||
if (Verbose) {
|
||||
for (int i = 0; i < localvariable_table_length(); i++) {
|
||||
int bci = table[i].start_bci;
|
||||
@ -2419,8 +2419,8 @@ void Method::print_on(outputStream* st) const {
|
||||
code()->print_value_on(st);
|
||||
}
|
||||
if (is_native()) {
|
||||
st->print_cr(" - native function: " INTPTR_FORMAT, p2i(native_function()));
|
||||
st->print_cr(" - signature handler: " INTPTR_FORMAT, p2i(signature_handler()));
|
||||
st->print_cr(" - native function: " PTR_FORMAT, p2i(native_function()));
|
||||
st->print_cr(" - signature handler: " PTR_FORMAT, p2i(signature_handler()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ void oopDesc::print_on(outputStream* st) const {
|
||||
}
|
||||
|
||||
void oopDesc::print_address_on(outputStream* st) const {
|
||||
st->print("{" INTPTR_FORMAT "}", p2i(this));
|
||||
st->print("{" PTR_FORMAT "}", p2i(this));
|
||||
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ VerifyOopClosure VerifyOopClosure::verify_oop;
|
||||
|
||||
template <class T> void VerifyOopClosure::do_oop_work(T* p) {
|
||||
oop obj = RawAccess<>::oop_load(p);
|
||||
guarantee(oopDesc::is_oop_or_null(obj), "invalid oop: " INTPTR_FORMAT, p2i((oopDesc*) obj));
|
||||
guarantee(oopDesc::is_oop_or_null(obj), "invalid oop: " PTR_FORMAT, p2i(obj));
|
||||
}
|
||||
|
||||
void VerifyOopClosure::do_oop(oop* p) { VerifyOopClosure::do_oop_work(p); }
|
||||
|
@ -58,7 +58,7 @@ void RecordComponent::metaspace_pointers_do(MetaspaceClosure* it) {
|
||||
}
|
||||
|
||||
void RecordComponent::print_value_on(outputStream* st) const {
|
||||
st->print("RecordComponent(" INTPTR_FORMAT ")", p2i(this));
|
||||
st->print("RecordComponent(" PTR_FORMAT ")", p2i(this));
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -396,7 +396,7 @@ public:
|
||||
void do_oop(oop* p) override {
|
||||
assert(UseCompressedOops, "Only needed with compressed oops");
|
||||
oop obj = CompressedOops::decode(*(narrowOop*)p);
|
||||
assert(obj == nullptr || dbg_is_good_oop(obj), "p: " INTPTR_FORMAT " obj: " INTPTR_FORMAT, p2i(p), p2i((oopDesc*)obj));
|
||||
assert(obj == nullptr || dbg_is_good_oop(obj), "p: " PTR_FORMAT " obj: " PTR_FORMAT, p2i(p), p2i(obj));
|
||||
*p = obj;
|
||||
}
|
||||
|
||||
@ -461,10 +461,10 @@ public:
|
||||
template <typename T> inline void do_oop_work(T* p) {
|
||||
_count++;
|
||||
oop obj = safe_load(p);
|
||||
assert(obj == nullptr || dbg_is_good_oop(obj), "p: " INTPTR_FORMAT " obj: " INTPTR_FORMAT, p2i(p), p2i((oopDesc*)obj));
|
||||
assert(obj == nullptr || dbg_is_good_oop(obj), "p: " PTR_FORMAT " obj: " PTR_FORMAT, p2i(p), p2i(obj));
|
||||
if (_chunk->has_bitmap()) {
|
||||
BitMap::idx_t index = _chunk->bit_index_for(p);
|
||||
assert(_chunk->bitmap().at(index), "Bit not set at index " SIZE_FORMAT " corresponding to " INTPTR_FORMAT, index, p2i(p));
|
||||
assert(_chunk->bitmap().at(index), "Bit not set at index " SIZE_FORMAT " corresponding to " PTR_FORMAT, index, p2i(p));
|
||||
}
|
||||
}
|
||||
|
||||
@ -505,14 +505,14 @@ public:
|
||||
_num_interpreted_frames++;
|
||||
}
|
||||
|
||||
log_develop_trace(continuations)("debug_verify_stack_chunk frame: %d sp: " INTPTR_FORMAT " pc: " INTPTR_FORMAT " interpreted: %d size: %d argsize: %d oops: %d", _num_frames, f.sp() - _chunk->start_address(), p2i(f.pc()), f.is_interpreted(), fsize, _argsize, num_oops);
|
||||
log_develop_trace(continuations)("debug_verify_stack_chunk frame: %d sp: " INTPTR_FORMAT " pc: " PTR_FORMAT " interpreted: %d size: %d argsize: %d oops: %d", _num_frames, f.sp() - _chunk->start_address(), p2i(f.pc()), f.is_interpreted(), fsize, _argsize, num_oops);
|
||||
LogTarget(Trace, continuations) lt;
|
||||
if (lt.develop_is_enabled()) {
|
||||
LogStream ls(lt);
|
||||
f.print_on(&ls);
|
||||
}
|
||||
assert(f.pc() != nullptr,
|
||||
"young: %d num_frames: %d sp: " INTPTR_FORMAT " start: " INTPTR_FORMAT " end: " INTPTR_FORMAT,
|
||||
"young: %d num_frames: %d sp: " PTR_FORMAT " start: " PTR_FORMAT " end: " PTR_FORMAT,
|
||||
!_chunk->requires_barriers(), _num_frames, p2i(f.sp()), p2i(_chunk->start_address()), p2i(_chunk->bottom_address()));
|
||||
|
||||
if (_num_frames == 0) {
|
||||
@ -549,7 +549,7 @@ public:
|
||||
|
||||
oop obj = safe_load(p);
|
||||
assert(obj == nullptr || dbg_is_good_oop(obj),
|
||||
"p: " INTPTR_FORMAT " obj: " INTPTR_FORMAT " index: " SIZE_FORMAT,
|
||||
"p: " PTR_FORMAT " obj: " PTR_FORMAT " index: " SIZE_FORMAT,
|
||||
p2i(p), p2i((oopDesc*)obj), index);
|
||||
|
||||
return true; // continue processing
|
||||
|
@ -108,7 +108,7 @@ inline intptr_t* stackChunkOopDesc::sp_address() const { return start_address()
|
||||
inline int stackChunkOopDesc::to_offset(intptr_t* p) const {
|
||||
assert(is_in_chunk(p)
|
||||
|| (p >= start_address() && (p - start_address()) <= stack_size() + frame::metadata_words),
|
||||
"p: " INTPTR_FORMAT " start: " INTPTR_FORMAT " end: " INTPTR_FORMAT, p2i(p), p2i(start_address()), p2i(bottom_address()));
|
||||
"p: " PTR_FORMAT " start: " PTR_FORMAT " end: " PTR_FORMAT, p2i(p), p2i(start_address()), p2i(bottom_address()));
|
||||
return p - start_address();
|
||||
}
|
||||
|
||||
@ -311,9 +311,9 @@ inline intptr_t* stackChunkOopDesc::interpreter_frame_local_at(const frame& fr,
|
||||
}
|
||||
|
||||
inline void stackChunkOopDesc::copy_from_stack_to_chunk(intptr_t* from, intptr_t* to, int size) {
|
||||
log_develop_trace(continuations)("Copying from v: " INTPTR_FORMAT " - " INTPTR_FORMAT " (%d words, %d bytes)",
|
||||
log_develop_trace(continuations)("Copying from v: " PTR_FORMAT " - " PTR_FORMAT " (%d words, %d bytes)",
|
||||
p2i(from), p2i(from + size), size, size << LogBytesPerWord);
|
||||
log_develop_trace(continuations)("Copying to h: " INTPTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") - " INTPTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") (%d words, %d bytes)",
|
||||
log_develop_trace(continuations)("Copying to h: " PTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") - " PTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") (%d words, %d bytes)",
|
||||
p2i(to), to - start_address(), relative_base() - to, p2i(to + size), to + size - start_address(),
|
||||
relative_base() - (to + size), size, size << LogBytesPerWord);
|
||||
|
||||
@ -330,10 +330,10 @@ inline void stackChunkOopDesc::copy_from_stack_to_chunk(intptr_t* from, intptr_t
|
||||
}
|
||||
|
||||
inline void stackChunkOopDesc::copy_from_chunk_to_stack(intptr_t* from, intptr_t* to, int size) {
|
||||
log_develop_trace(continuations)("Copying from h: " INTPTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") - " INTPTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") (%d words, %d bytes)",
|
||||
log_develop_trace(continuations)("Copying from h: " PTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") - " PTR_FORMAT "(" INTPTR_FORMAT "," INTPTR_FORMAT ") (%d words, %d bytes)",
|
||||
p2i(from), from - start_address(), relative_base() - from, p2i(from + size), from + size - start_address(),
|
||||
relative_base() - (from + size), size, size << LogBytesPerWord);
|
||||
log_develop_trace(continuations)("Copying to v: " INTPTR_FORMAT " - " INTPTR_FORMAT " (%d words, %d bytes)", p2i(to),
|
||||
log_develop_trace(continuations)("Copying to v: " PTR_FORMAT " - " PTR_FORMAT " (%d words, %d bytes)", p2i(to),
|
||||
p2i(to + size), size, size << LogBytesPerWord);
|
||||
|
||||
assert(from >= start_address(), "");
|
||||
|
@ -335,21 +335,21 @@ class Copy : AllStatic {
|
||||
}
|
||||
|
||||
static void assert_params_ok(const void* from, void* to, intptr_t alignment) {
|
||||
assert(is_aligned(from, alignment), "must be aligned: " INTPTR_FORMAT, p2i(from));
|
||||
assert(is_aligned(to, alignment), "must be aligned: " INTPTR_FORMAT, p2i(to));
|
||||
assert(is_aligned(from, alignment), "must be aligned: " PTR_FORMAT, p2i(from));
|
||||
assert(is_aligned(to, alignment), "must be aligned: " PTR_FORMAT, p2i(to));
|
||||
}
|
||||
|
||||
static void assert_params_ok(HeapWord* to, intptr_t alignment) {
|
||||
assert(is_aligned(to, alignment), "must be aligned: " INTPTR_FORMAT, p2i(to));
|
||||
assert(is_aligned(to, alignment), "must be aligned: " PTR_FORMAT, p2i(to));
|
||||
}
|
||||
|
||||
static void assert_params_aligned(const HeapWord* from, HeapWord* to) {
|
||||
assert(is_aligned(from, BytesPerLong), "must be aligned: " INTPTR_FORMAT, p2i(from));
|
||||
assert(is_aligned(to, BytesPerLong), "must be aligned: " INTPTR_FORMAT, p2i(to));
|
||||
assert(is_aligned(from, BytesPerLong), "must be aligned: " PTR_FORMAT, p2i(from));
|
||||
assert(is_aligned(to, BytesPerLong), "must be aligned: " PTR_FORMAT, p2i(to));
|
||||
}
|
||||
|
||||
static void assert_params_aligned(HeapWord* to) {
|
||||
assert(is_aligned(to, BytesPerLong), "must be aligned: " INTPTR_FORMAT, p2i(to));
|
||||
assert(is_aligned(to, BytesPerLong), "must be aligned: " PTR_FORMAT, p2i(to));
|
||||
}
|
||||
|
||||
static void assert_byte_count_ok(size_t byte_count, size_t unit_size) {
|
||||
|
@ -64,7 +64,7 @@ bool ElfDecoder::get_source_info(address pc, char* filename, size_t filename_len
|
||||
int offset_in_library = -1;
|
||||
if (!os::dll_address_to_library_name(pc, filepath, sizeof(filepath), &offset_in_library)) {
|
||||
// Method not found. offset_in_library should not overflow.
|
||||
DWARF_LOG_ERROR("Did not find library for address " INTPTR_FORMAT, p2i(pc))
|
||||
DWARF_LOG_ERROR("Did not find library for address " PTR_FORMAT, p2i(pc))
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ bool ElfDecoder::get_source_info(address pc, char* filename, size_t filename_len
|
||||
return false;
|
||||
}
|
||||
|
||||
DWARF_LOG_SUMMARY("pc: " INTPTR_FORMAT ", offset: " INT32_FORMAT_X_0 ", filename: %s, line: %u",
|
||||
DWARF_LOG_SUMMARY("pc: " PTR_FORMAT ", offset: " INT32_FORMAT_X_0 ", filename: %s, line: %u",
|
||||
p2i(pc), offset_in_library, filename, *line);
|
||||
DWARF_LOG_INFO("") // To structure the debug output better.
|
||||
return true;
|
||||
|
@ -137,7 +137,7 @@ void UnloadingEventLog::log(Thread* thread, InstanceKlass* ik) {
|
||||
_records[index].timestamp = timestamp;
|
||||
stringStream st(_records[index].data.buffer(),
|
||||
_records[index].data.size());
|
||||
st.print("Unloading class " INTPTR_FORMAT " ", p2i(ik));
|
||||
st.print("Unloading class " PTR_FORMAT " ", p2i(ik));
|
||||
ik->name()->print_value_on(&st);
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ void ExceptionsEventLog::log(Thread* thread, Handle h_exception, const char* mes
|
||||
_records[index].data.size());
|
||||
st.print("Exception <");
|
||||
h_exception->print_value_on(&st);
|
||||
st.print("%s%s> (" INTPTR_FORMAT ") \n"
|
||||
st.print("%s%s> (" PTR_FORMAT ") \n"
|
||||
"thrown [%s, line %d]",
|
||||
message ? ": " : "", message ? message : "",
|
||||
p2i(h_exception()), file, line);
|
||||
|
@ -149,7 +149,7 @@ template <class T> class EventLogBase : public EventLog {
|
||||
void print(outputStream* out, EventRecord<T>& e) {
|
||||
out->print("Event: %.3f ", e.timestamp);
|
||||
if (e.thread != NULL) {
|
||||
out->print("Thread " INTPTR_FORMAT " ", p2i(e.thread));
|
||||
out->print("Thread " PTR_FORMAT " ", p2i(e.thread));
|
||||
}
|
||||
print(out, e.data);
|
||||
}
|
||||
|
@ -147,8 +147,8 @@ void Exceptions::_throw(JavaThread* thread, const char* file, int line, Handle h
|
||||
|
||||
// tracing (do this up front - so it works during boot strapping)
|
||||
// Note, the print_value_string() argument is not called unless logging is enabled!
|
||||
log_info(exceptions)("Exception <%s%s%s> (" INTPTR_FORMAT ") \n"
|
||||
"thrown [%s, line %d]\nfor thread " INTPTR_FORMAT,
|
||||
log_info(exceptions)("Exception <%s%s%s> (" PTR_FORMAT ") \n"
|
||||
"thrown [%s, line %d]\nfor thread " PTR_FORMAT,
|
||||
h_exception->print_value_string(),
|
||||
message ? ": " : "", message ? message : "",
|
||||
p2i(h_exception()), file, line, p2i(thread));
|
||||
@ -429,7 +429,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
|
||||
// Pass through an Error, including BootstrapMethodError, any other form
|
||||
// of linkage error, or say ThreadDeath/OutOfMemoryError
|
||||
if (ls != NULL) {
|
||||
ls->print_cr("bootstrap method invocation wraps BSME around " INTPTR_FORMAT, p2i((void *)exception));
|
||||
ls->print_cr("bootstrap method invocation wraps BSME around " PTR_FORMAT, p2i(exception));
|
||||
exception->print_on(ls);
|
||||
}
|
||||
return;
|
||||
@ -437,7 +437,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
|
||||
|
||||
// Otherwise wrap the exception in a BootstrapMethodError
|
||||
if (ls != NULL) {
|
||||
ls->print_cr("%s throws BSME for " INTPTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i((void *)exception));
|
||||
ls->print_cr("%s throws BSME for " PTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i(exception));
|
||||
exception->print_on(ls);
|
||||
}
|
||||
Handle nested_exception(THREAD, exception);
|
||||
|
@ -131,6 +131,11 @@ class oopDesc;
|
||||
#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR
|
||||
#define SIZE_FORMAT "%" PRIuPTR
|
||||
#define SIZE_FORMAT_X "0x%" PRIxPTR
|
||||
#ifdef _LP64
|
||||
#define SIZE_FORMAT_X_0 "0x%016" PRIxPTR
|
||||
#else
|
||||
#define SIZE_FORMAT_X_0 "0x%08" PRIxPTR
|
||||
#endif
|
||||
#define SIZE_FORMAT_W(width) "%" #width PRIuPTR
|
||||
|
||||
#define INTX_FORMAT "%" PRIdPTR
|
||||
|
@ -336,7 +336,7 @@ public:
|
||||
}
|
||||
|
||||
void print() const {
|
||||
tty->print("Growable Array " INTPTR_FORMAT, p2i(this));
|
||||
tty->print("Growable Array " PTR_FORMAT, p2i(this));
|
||||
tty->print(": length %d (_max %d) { ", _len, _max);
|
||||
for (int i = 0; i < _len; i++) {
|
||||
tty->print(INTPTR_FORMAT " ", *(intptr_t*)&(_data[i]));
|
||||
|
@ -288,7 +288,7 @@ void outputStream::print_data(void* data, size_t len, bool with_ascii, bool rel_
|
||||
if (rel_addr) {
|
||||
indent().print("%07" PRIxPTR ":", i);
|
||||
} else {
|
||||
indent().print(INTPTR_FORMAT ":", p2i((unsigned char*)data + i));
|
||||
indent().print(PTR_FORMAT ":", p2i((unsigned char*)data + i));
|
||||
}
|
||||
}
|
||||
if (i % 2 == 0) {
|
||||
|
@ -1073,7 +1073,7 @@ void VMError::report(outputStream* st, bool _verbose) {
|
||||
}
|
||||
|
||||
if (Universe::is_fully_initialized()) {
|
||||
st->print_cr("Polling page: " INTPTR_FORMAT, p2i(SafepointMechanism::get_polling_page()));
|
||||
st->print_cr("Polling page: " PTR_FORMAT, p2i(SafepointMechanism::get_polling_page()));
|
||||
st->cr();
|
||||
}
|
||||
}
|
||||
@ -1290,7 +1290,7 @@ void VMError::print_vm_info(outputStream* st) {
|
||||
GCLogPrecious::print_on_error(st);
|
||||
Universe::heap()->print_on_error(st);
|
||||
st->cr();
|
||||
st->print_cr("Polling page: " INTPTR_FORMAT, p2i(SafepointMechanism::get_polling_page()));
|
||||
st->print_cr("Polling page: " PTR_FORMAT, p2i(SafepointMechanism::get_polling_page()));
|
||||
st->cr();
|
||||
}
|
||||
|
||||
|
@ -265,6 +265,7 @@ TEST(globalDefinitions, format_specifiers) {
|
||||
check_format(SSIZE_FORMAT_W(-5), (ssize_t)123, "123 ");
|
||||
check_format(SIZE_FORMAT, (size_t)123u, "123");
|
||||
check_format(SIZE_FORMAT_X, (size_t)0x123u, "0x123");
|
||||
check_format(SIZE_FORMAT_X_0, (size_t)0x123u, "0x" LP64_ONLY("00000000") "00000123");
|
||||
check_format(SIZE_FORMAT_W(5), (size_t)123u, " 123");
|
||||
check_format(SIZE_FORMAT_W(-5), (size_t)123u, "123 ");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user