mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-08 20:49:44 +00:00
8039743: Use correct format specifier to print size_t values and pointers in the GC code
Co-authored-by: Mikael Vidstedt <mikael.vidstedt@oracle.com> Reviewed-by: jmasa, sjohanss
This commit is contained in:
parent
4bc795f2db
commit
d78446aa45
@ -564,11 +564,11 @@ void CompactibleFreeListSpace::reportIndexedFreeListStatistics() const {
|
||||
"--------------------------------\n");
|
||||
size_t total_size = totalSizeInIndexedFreeLists();
|
||||
size_t free_blocks = numFreeBlocksInIndexedFreeLists();
|
||||
gclog_or_tty->print("Total Free Space: %d\n", total_size);
|
||||
gclog_or_tty->print("Max Chunk Size: %d\n", maxChunkSizeInIndexedFreeLists());
|
||||
gclog_or_tty->print("Number of Blocks: %d\n", free_blocks);
|
||||
gclog_or_tty->print("Total Free Space: " SIZE_FORMAT "\n", total_size);
|
||||
gclog_or_tty->print("Max Chunk Size: " SIZE_FORMAT "\n", maxChunkSizeInIndexedFreeLists());
|
||||
gclog_or_tty->print("Number of Blocks: " SIZE_FORMAT "\n", free_blocks);
|
||||
if (free_blocks != 0) {
|
||||
gclog_or_tty->print("Av. Block Size: %d\n", total_size/free_blocks);
|
||||
gclog_or_tty->print("Av. Block Size: " SIZE_FORMAT "\n", total_size/free_blocks);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2152,7 +2152,7 @@ void CompactibleFreeListSpace::beginSweepFLCensus(
|
||||
for (i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
|
||||
AdaptiveFreeList<FreeChunk>* fl = &_indexedFreeList[i];
|
||||
if (PrintFLSStatistics > 1) {
|
||||
gclog_or_tty->print("size[%d] : ", i);
|
||||
gclog_or_tty->print("size[" SIZE_FORMAT "] : ", i);
|
||||
}
|
||||
fl->compute_desired(inter_sweep_current, inter_sweep_estimate, intra_sweep_estimate);
|
||||
fl->set_coal_desired((ssize_t)((double)fl->desired() * CMSSmallCoalSurplusPercent));
|
||||
@ -2683,7 +2683,8 @@ void CFLS_LAB::compute_desired_plab_size() {
|
||||
_global_num_workers[i] = 0;
|
||||
_global_num_blocks[i] = 0;
|
||||
if (PrintOldPLAB) {
|
||||
gclog_or_tty->print_cr("[%d]: %d", i, (size_t)_blocks_to_claim[i].average());
|
||||
gclog_or_tty->print_cr("[" SIZE_FORMAT "]: " SIZE_FORMAT,
|
||||
i, (size_t)_blocks_to_claim[i].average());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2722,7 +2723,7 @@ void CFLS_LAB::retire(int tid) {
|
||||
}
|
||||
}
|
||||
if (PrintOldPLAB) {
|
||||
gclog_or_tty->print_cr("%d[%d]: %d/%d/%d",
|
||||
gclog_or_tty->print_cr("%d[" SIZE_FORMAT "]: " SIZE_FORMAT "/" SIZE_FORMAT "/" SIZE_FORMAT,
|
||||
tid, i, num_retire, _num_blocks[i], (size_t)_blocks_to_claim[i].average());
|
||||
}
|
||||
// Reset stats for next round
|
||||
|
||||
@ -2894,13 +2894,13 @@ bool CMSCollector::is_cms_reachable(HeapWord* addr) {
|
||||
|
||||
// Clear the marking bit map array before starting, but, just
|
||||
// for kicks, first report if the given address is already marked
|
||||
gclog_or_tty->print_cr("Start: Address 0x%x is%s marked", addr,
|
||||
gclog_or_tty->print_cr("Start: Address " PTR_FORMAT " is%s marked", addr,
|
||||
_markBitMap.isMarked(addr) ? "" : " not");
|
||||
|
||||
if (verify_after_remark()) {
|
||||
MutexLockerEx x(verification_mark_bm()->lock(), Mutex::_no_safepoint_check_flag);
|
||||
bool result = verification_mark_bm()->isMarked(addr);
|
||||
gclog_or_tty->print_cr("TransitiveMark: Address 0x%x %s marked", addr,
|
||||
gclog_or_tty->print_cr("TransitiveMark: Address " PTR_FORMAT " %s marked", addr,
|
||||
result ? "IS" : "is NOT");
|
||||
return result;
|
||||
} else {
|
||||
@ -4569,7 +4569,7 @@ void CMSCollector::abortable_preclean() {
|
||||
}
|
||||
}
|
||||
if (PrintCMSStatistics > 0) {
|
||||
gclog_or_tty->print(" [%d iterations, %d waits, %d cards)] ",
|
||||
gclog_or_tty->print(" [" SIZE_FORMAT " iterations, " SIZE_FORMAT " waits, " SIZE_FORMAT " cards)] ",
|
||||
loops, waited, cumworkdone);
|
||||
}
|
||||
}
|
||||
@ -4721,7 +4721,7 @@ size_t CMSCollector::preclean_work(bool clean_refs, bool clean_survivor) {
|
||||
numIter++, lastNumCards = curNumCards, cumNumCards += curNumCards) {
|
||||
curNumCards = preclean_mod_union_table(_cmsGen, &smoac_cl);
|
||||
if (Verbose && PrintGCDetails) {
|
||||
gclog_or_tty->print(" (modUnionTable: %d cards)", curNumCards);
|
||||
gclog_or_tty->print(" (modUnionTable: " SIZE_FORMAT " cards)", curNumCards);
|
||||
}
|
||||
// Either there are very few dirty cards, so re-mark
|
||||
// pause will be small anyway, or our pre-cleaning isn't
|
||||
@ -4743,7 +4743,7 @@ size_t CMSCollector::preclean_work(bool clean_refs, bool clean_survivor) {
|
||||
curNumCards = preclean_card_table(_cmsGen, &smoac_cl);
|
||||
cumNumCards += curNumCards;
|
||||
if (PrintGCDetails && PrintCMSStatistics != 0) {
|
||||
gclog_or_tty->print_cr(" (cardTable: %d cards, re-scanned %d cards, %d iterations)",
|
||||
gclog_or_tty->print_cr(" (cardTable: " SIZE_FORMAT " cards, re-scanned " SIZE_FORMAT " cards, " SIZE_FORMAT " iterations)",
|
||||
curNumCards, cumNumCards, numIter);
|
||||
}
|
||||
return cumNumCards; // as a measure of useful work done
|
||||
@ -8205,7 +8205,7 @@ SweepClosure::~SweepClosure() {
|
||||
void SweepClosure::initialize_free_range(HeapWord* freeFinger,
|
||||
bool freeRangeInFreeLists) {
|
||||
if (CMSTraceSweeper) {
|
||||
gclog_or_tty->print("---- Start free range at 0x%x with free block (%d)\n",
|
||||
gclog_or_tty->print("---- Start free range at " PTR_FORMAT " with free block (%d)\n",
|
||||
freeFinger, freeRangeInFreeLists);
|
||||
}
|
||||
assert(!inFreeRange(), "Trampling existing free range");
|
||||
@ -8275,10 +8275,10 @@ size_t SweepClosure::do_blk_careful(HeapWord* addr) {
|
||||
pointer_delta(addr, freeFinger()));
|
||||
if (CMSTraceSweeper) {
|
||||
gclog_or_tty->print("Sweep: last chunk: ");
|
||||
gclog_or_tty->print("put_free_blk 0x%x ("SIZE_FORMAT") "
|
||||
"[coalesced:"SIZE_FORMAT"]\n",
|
||||
gclog_or_tty->print("put_free_blk " PTR_FORMAT " ("SIZE_FORMAT") "
|
||||
"[coalesced:%d]\n",
|
||||
freeFinger(), pointer_delta(addr, freeFinger()),
|
||||
lastFreeRangeCoalesced());
|
||||
lastFreeRangeCoalesced() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8421,7 +8421,7 @@ void SweepClosure::do_already_free_chunk(FreeChunk* fc) {
|
||||
// the midst of a free range, we are coalescing
|
||||
print_free_block_coalesced(fc);
|
||||
if (CMSTraceSweeper) {
|
||||
gclog_or_tty->print(" -- pick up free block 0x%x (%d)\n", fc, size);
|
||||
gclog_or_tty->print(" -- pick up free block " PTR_FORMAT " (" SIZE_FORMAT ")\n", fc, size);
|
||||
}
|
||||
// remove it from the free lists
|
||||
_sp->removeFreeChunkFromFreeLists(fc);
|
||||
@ -8483,7 +8483,7 @@ size_t SweepClosure::do_garbage_chunk(FreeChunk* fc) {
|
||||
// this will be swept up when we hit the end of the
|
||||
// free range
|
||||
if (CMSTraceSweeper) {
|
||||
gclog_or_tty->print(" -- pick up garbage 0x%x (%d) \n", fc, size);
|
||||
gclog_or_tty->print(" -- pick up garbage " PTR_FORMAT " (" SIZE_FORMAT ")\n", fc, size);
|
||||
}
|
||||
// If the chunk is being coalesced and the current free range is
|
||||
// in the free lists, remove the current free range so that it
|
||||
@ -8576,7 +8576,7 @@ void SweepClosure::do_post_free_or_garbage_chunk(FreeChunk* fc,
|
||||
}
|
||||
|
||||
if (CMSTraceSweeper) {
|
||||
gclog_or_tty->print_cr(" -- pick up another chunk at 0x%x (%d)", fc, chunkSize);
|
||||
gclog_or_tty->print_cr(" -- pick up another chunk at " PTR_FORMAT " (" SIZE_FORMAT ")", fc, chunkSize);
|
||||
}
|
||||
|
||||
HeapWord* const fc_addr = (HeapWord*) fc;
|
||||
@ -8705,7 +8705,7 @@ void SweepClosure::flush_cur_free_chunk(HeapWord* chunk, size_t size) {
|
||||
"chunk should not be in free lists yet");
|
||||
}
|
||||
if (CMSTraceSweeper) {
|
||||
gclog_or_tty->print_cr(" -- add free block 0x%x (%d) to free lists",
|
||||
gclog_or_tty->print_cr(" -- add free block " PTR_FORMAT " (" SIZE_FORMAT ") to free lists",
|
||||
chunk, size);
|
||||
}
|
||||
// A new free range is going to be starting. The current
|
||||
|
||||
@ -265,7 +265,7 @@ void PromotionInfo::print_statistics(uint worker_id) const {
|
||||
slots += _spoolHead->bufferSize - 1;
|
||||
blocks++;
|
||||
}
|
||||
gclog_or_tty->print_cr(" [worker %d] promo_blocks = %d, promo_slots = %d ",
|
||||
gclog_or_tty->print_cr(" [worker %d] promo_blocks = " SIZE_FORMAT ", promo_slots = " SIZE_FORMAT,
|
||||
worker_id, blocks, slots);
|
||||
}
|
||||
|
||||
|
||||
@ -3754,7 +3754,7 @@ void CMTask::drain_local_queue(bool partially) {
|
||||
|
||||
if (_task_queue->size() > target_size) {
|
||||
if (_cm->verbose_high()) {
|
||||
gclog_or_tty->print_cr("[%u] draining local queue, target size = %d",
|
||||
gclog_or_tty->print_cr("[%u] draining local queue, target size = " SIZE_FORMAT,
|
||||
_worker_id, target_size);
|
||||
}
|
||||
|
||||
@ -3782,7 +3782,7 @@ void CMTask::drain_local_queue(bool partially) {
|
||||
}
|
||||
|
||||
if (_cm->verbose_high()) {
|
||||
gclog_or_tty->print_cr("[%u] drained local queue, size = %d",
|
||||
gclog_or_tty->print_cr("[%u] drained local queue, size = %u",
|
||||
_worker_id, _task_queue->size());
|
||||
}
|
||||
}
|
||||
@ -3810,7 +3810,7 @@ void CMTask::drain_global_stack(bool partially) {
|
||||
|
||||
if (_cm->mark_stack_size() > target_size) {
|
||||
if (_cm->verbose_low()) {
|
||||
gclog_or_tty->print_cr("[%u] draining global_stack, target size %d",
|
||||
gclog_or_tty->print_cr("[%u] draining global_stack, target size " SIZE_FORMAT,
|
||||
_worker_id, target_size);
|
||||
}
|
||||
|
||||
@ -3820,7 +3820,7 @@ void CMTask::drain_global_stack(bool partially) {
|
||||
}
|
||||
|
||||
if (_cm->verbose_low()) {
|
||||
gclog_or_tty->print_cr("[%u] drained global stack, size = %d",
|
||||
gclog_or_tty->print_cr("[%u] drained global stack, size = " SIZE_FORMAT,
|
||||
_worker_id, _cm->mark_stack_size());
|
||||
}
|
||||
}
|
||||
|
||||
@ -3296,7 +3296,7 @@ public:
|
||||
int *val;
|
||||
for (cur = start; cur < end; cur++) {
|
||||
val = (int *) cur;
|
||||
gclog_or_tty->print("\t "PTR_FORMAT":"PTR_FORMAT"\n", val, *val);
|
||||
gclog_or_tty->print("\t "PTR_FORMAT":%d\n", val, *val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -491,7 +491,7 @@ void OtherRegionsTable::add_reference(OopOrNarrowOopStar from, int tid) {
|
||||
} else {
|
||||
if (G1TraceHeapRegionRememberedSet) {
|
||||
gclog_or_tty->print_cr(" [tid %d] sparse table entry "
|
||||
"overflow(f: %d, t: %d)",
|
||||
"overflow(f: %d, t: %u)",
|
||||
tid, from_hrs_ind, cur_hrs_ind);
|
||||
}
|
||||
}
|
||||
@ -610,7 +610,7 @@ PerRegionTable* OtherRegionsTable::delete_region_table() {
|
||||
_n_coarse_entries++;
|
||||
if (G1TraceHeapRegionRememberedSet) {
|
||||
gclog_or_tty->print("Coarsened entry in region [" PTR_FORMAT "...] "
|
||||
"for region [" PTR_FORMAT "...] (%d coarse entries).\n",
|
||||
"for region [" PTR_FORMAT "...] (" SIZE_FORMAT " coarse entries).\n",
|
||||
hr()->bottom(),
|
||||
max->hr()->bottom(),
|
||||
_n_coarse_entries);
|
||||
@ -903,10 +903,12 @@ void HeapRegionRemSet::print() {
|
||||
}
|
||||
if (iter.n_yielded() != occupied()) {
|
||||
gclog_or_tty->print_cr("Yielded disagrees with occupied:");
|
||||
gclog_or_tty->print_cr(" %6d yielded (%6d coarse, %6d fine).",
|
||||
gclog_or_tty->print_cr(" " SIZE_FORMAT_W(6) " yielded (" SIZE_FORMAT_W(6)
|
||||
" coarse, " SIZE_FORMAT_W(6) " fine).",
|
||||
iter.n_yielded(),
|
||||
iter.n_yielded_coarse(), iter.n_yielded_fine());
|
||||
gclog_or_tty->print_cr(" %6d occ (%6d coarse, %6d fine).",
|
||||
gclog_or_tty->print_cr(" " SIZE_FORMAT_W(6) " occ (" SIZE_FORMAT_W(6)
|
||||
" coarse, " SIZE_FORMAT_W(6) " fine).",
|
||||
occupied(), occ_coarse(), occ_fine());
|
||||
}
|
||||
guarantee(iter.n_yielded() == occupied(),
|
||||
|
||||
@ -187,10 +187,10 @@ SurvRateGroup::all_surviving_words_recorded(bool propagate) {
|
||||
#ifndef PRODUCT
|
||||
void
|
||||
SurvRateGroup::print() {
|
||||
gclog_or_tty->print_cr("Surv Rate Group: %s (%d entries)",
|
||||
gclog_or_tty->print_cr("Surv Rate Group: %s (" SIZE_FORMAT " entries)",
|
||||
_name, _region_num);
|
||||
for (size_t i = 0; i < _region_num; ++i) {
|
||||
gclog_or_tty->print_cr(" age %4d surv rate %6.2lf %% pred %6.2lf %%",
|
||||
gclog_or_tty->print_cr(" age " SIZE_FORMAT_W(4) " surv rate %6.2lf %% pred %6.2lf %%",
|
||||
i, _surv_rate[i] * 100.0,
|
||||
_g1p->get_new_prediction(_surv_rate_pred[i]) * 100.0);
|
||||
}
|
||||
@ -203,14 +203,15 @@ SurvRateGroup::print_surv_rate_summary() {
|
||||
return;
|
||||
|
||||
gclog_or_tty->print_cr("");
|
||||
gclog_or_tty->print_cr("%s Rate Summary (for up to age %d)", _name, length-1);
|
||||
gclog_or_tty->print_cr("%s Rate Summary (for up to age " SIZE_FORMAT ")", _name, length-1);
|
||||
gclog_or_tty->print_cr(" age range survival rate (avg) samples (avg)");
|
||||
gclog_or_tty->print_cr(" ---------------------------------------------------------");
|
||||
|
||||
size_t index = 0;
|
||||
size_t limit = MIN2((int) length, 10);
|
||||
while (index < limit) {
|
||||
gclog_or_tty->print_cr(" %4d %6.2lf%% %6.2lf",
|
||||
gclog_or_tty->print_cr(" " SIZE_FORMAT_W(4)
|
||||
" %6.2lf%% %6.2lf",
|
||||
index, _summary_surv_rates[index]->avg() * 100.0,
|
||||
(double) _summary_surv_rates[index]->num());
|
||||
++index;
|
||||
@ -228,7 +229,8 @@ SurvRateGroup::print_surv_rate_summary() {
|
||||
++index;
|
||||
|
||||
if (index == length || num % 10 == 0) {
|
||||
gclog_or_tty->print_cr(" %4d .. %4d %6.2lf%% %6.2lf",
|
||||
gclog_or_tty->print_cr(" " SIZE_FORMAT_W(4) " .. " SIZE_FORMAT_W(4)
|
||||
" %6.2lf%% %6.2lf",
|
||||
(index-1) / 10 * 10, index-1, sum / (double) num,
|
||||
(double) samples / (double) num);
|
||||
sum = 0.0;
|
||||
|
||||
@ -143,7 +143,8 @@ void AdjoiningGenerations::request_old_gen_expansion(size_t expand_in_bytes) {
|
||||
|
||||
if (TraceAdaptiveGCBoundary) {
|
||||
gclog_or_tty->print_cr("Before expansion of old gen with boundary move");
|
||||
gclog_or_tty->print_cr(" Requested change: 0x%x Attempted change: 0x%x",
|
||||
gclog_or_tty->print_cr(" Requested change: " SIZE_FORMAT_HEX
|
||||
" Attempted change: " SIZE_FORMAT_HEX,
|
||||
expand_in_bytes, change_in_bytes);
|
||||
if (!PrintHeapAtGC) {
|
||||
Universe::print_on(gclog_or_tty);
|
||||
@ -201,7 +202,7 @@ bool AdjoiningGenerations::request_young_gen_expansion(size_t expand_in_bytes) {
|
||||
|
||||
if (TraceAdaptiveGCBoundary) {
|
||||
gclog_or_tty->print_cr("Before expansion of young gen with boundary move");
|
||||
gclog_or_tty->print_cr(" Requested change: 0x%x Attempted change: 0x%x",
|
||||
gclog_or_tty->print_cr(" Requested change: " SIZE_FORMAT_HEX " Attempted change: " SIZE_FORMAT_HEX,
|
||||
expand_in_bytes, change_in_bytes);
|
||||
if (!PrintHeapAtGC) {
|
||||
Universe::print_on(gclog_or_tty);
|
||||
|
||||
@ -127,22 +127,22 @@ size_t ASPSOldGen::available_for_contraction() {
|
||||
size_t result_aligned = align_size_down(result, gen_alignment);
|
||||
if (PrintAdaptiveSizePolicy && Verbose) {
|
||||
gclog_or_tty->print_cr("\nASPSOldGen::available_for_contraction:"
|
||||
" %d K / 0x%x", result_aligned/K, result_aligned);
|
||||
gclog_or_tty->print_cr(" reserved().byte_size() %d K / 0x%x ",
|
||||
" " SIZE_FORMAT " K / " SIZE_FORMAT_HEX, result_aligned/K, result_aligned);
|
||||
gclog_or_tty->print_cr(" reserved().byte_size() " SIZE_FORMAT " K / " SIZE_FORMAT_HEX,
|
||||
reserved().byte_size()/K, reserved().byte_size());
|
||||
size_t working_promoted = (size_t) policy->avg_promoted()->padded_average();
|
||||
gclog_or_tty->print_cr(" padded promoted %d K / 0x%x",
|
||||
gclog_or_tty->print_cr(" padded promoted " SIZE_FORMAT " K / " SIZE_FORMAT_HEX,
|
||||
working_promoted/K, working_promoted);
|
||||
gclog_or_tty->print_cr(" used %d K / 0x%x",
|
||||
gclog_or_tty->print_cr(" used " SIZE_FORMAT " K / " SIZE_FORMAT_HEX,
|
||||
used_in_bytes()/K, used_in_bytes());
|
||||
gclog_or_tty->print_cr(" min_gen_size() %d K / 0x%x",
|
||||
gclog_or_tty->print_cr(" min_gen_size() " SIZE_FORMAT " K / " SIZE_FORMAT_HEX,
|
||||
min_gen_size()/K, min_gen_size());
|
||||
gclog_or_tty->print_cr(" max_contraction %d K / 0x%x",
|
||||
gclog_or_tty->print_cr(" max_contraction " SIZE_FORMAT " K / " SIZE_FORMAT_HEX,
|
||||
max_contraction/K, max_contraction);
|
||||
gclog_or_tty->print_cr(" without alignment %d K / 0x%x",
|
||||
gclog_or_tty->print_cr(" without alignment " SIZE_FORMAT " K / " SIZE_FORMAT_HEX,
|
||||
policy->promo_increment(max_contraction)/K,
|
||||
policy->promo_increment(max_contraction));
|
||||
gclog_or_tty->print_cr(" alignment 0x%x", gen_alignment);
|
||||
gclog_or_tty->print_cr(" alignment " SIZE_FORMAT_HEX, gen_alignment);
|
||||
}
|
||||
assert(result_aligned <= max_contraction, "arithmetic is wrong");
|
||||
return result_aligned;
|
||||
|
||||
@ -112,11 +112,11 @@ size_t ASPSYoungGen::available_for_contraction() {
|
||||
size_t result = policy->eden_increment_aligned_down(max_contraction);
|
||||
size_t result_aligned = align_size_down(result, gen_alignment);
|
||||
if (PrintAdaptiveSizePolicy && Verbose) {
|
||||
gclog_or_tty->print_cr("ASPSYoungGen::available_for_contraction: %d K",
|
||||
gclog_or_tty->print_cr("ASPSYoungGen::available_for_contraction: " SIZE_FORMAT " K",
|
||||
result_aligned/K);
|
||||
gclog_or_tty->print_cr(" max_contraction %d K", max_contraction/K);
|
||||
gclog_or_tty->print_cr(" eden_avail %d K", eden_avail/K);
|
||||
gclog_or_tty->print_cr(" gen_avail %d K", gen_avail/K);
|
||||
gclog_or_tty->print_cr(" max_contraction " SIZE_FORMAT " K", max_contraction/K);
|
||||
gclog_or_tty->print_cr(" eden_avail " SIZE_FORMAT " K", eden_avail/K);
|
||||
gclog_or_tty->print_cr(" gen_avail " SIZE_FORMAT " K", gen_avail/K);
|
||||
}
|
||||
return result_aligned;
|
||||
}
|
||||
|
||||
@ -487,7 +487,7 @@ void GCTaskManager::set_active_gang() {
|
||||
if (TraceDynamicGCThreads) {
|
||||
gclog_or_tty->print_cr("GCTaskManager::set_active_gang(): "
|
||||
"all_workers_active() %d workers %d "
|
||||
"active %d ParallelGCThreads %d ",
|
||||
"active %d ParallelGCThreads " UINTX_FORMAT,
|
||||
all_workers_active(), workers(), active_workers(),
|
||||
ParallelGCThreads);
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ void StealRegionCompactionTask::do_it(GCTaskManager* manager, uint which) {
|
||||
cm->set_region_stack(ParCompactionManager::region_list(which_stack_index));
|
||||
if (TraceDynamicGCThreads) {
|
||||
gclog_or_tty->print_cr("StealRegionCompactionTask::do_it "
|
||||
"region_stack_index %d region_stack = 0x%x "
|
||||
"region_stack_index %d region_stack = " PTR_FORMAT " "
|
||||
" empty (%d) use all workers %d",
|
||||
which_stack_index, ParCompactionManager::region_list(which_stack_index),
|
||||
cm->region_stack()->is_empty(),
|
||||
@ -366,7 +366,7 @@ void DrainStacksCompactionTask::do_it(GCTaskManager* manager, uint which) {
|
||||
if (TraceDynamicGCThreads) {
|
||||
void* old_region_stack = (void*) cm->region_stack();
|
||||
int old_region_stack_index = cm->region_stack_index();
|
||||
gclog_or_tty->print_cr("Pushing region stack 0x%x/%d",
|
||||
gclog_or_tty->print_cr("Pushing region stack " PTR_FORMAT "/%d",
|
||||
old_region_stack, old_region_stack_index);
|
||||
}
|
||||
|
||||
|
||||
@ -379,7 +379,7 @@ void PSAdaptiveSizePolicy::compute_eden_space_size(
|
||||
gclog_or_tty->print_cr(
|
||||
"PSAdaptiveSizePolicy::compute_eden_space_size: gc time limit"
|
||||
" gc_cost: %f "
|
||||
" GCTimeLimit: %d",
|
||||
" GCTimeLimit: " UINTX_FORMAT,
|
||||
gc_cost(), GCTimeLimit);
|
||||
}
|
||||
}
|
||||
@ -586,7 +586,7 @@ void PSAdaptiveSizePolicy::compute_old_gen_free_space(
|
||||
gclog_or_tty->print_cr(
|
||||
"PSAdaptiveSizePolicy::compute_old_gen_free_space: gc time limit"
|
||||
" gc_cost: %f "
|
||||
" GCTimeLimit: %d",
|
||||
" GCTimeLimit: " UINTX_FORMAT,
|
||||
gc_cost(), GCTimeLimit);
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,7 +270,8 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
|
||||
gclog_or_tty->print_cr(" collection: %d ",
|
||||
heap->total_collections());
|
||||
if (Verbose) {
|
||||
gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d",
|
||||
gclog_or_tty->print("old_gen_capacity: " SIZE_FORMAT
|
||||
" young_gen_capacity: " SIZE_FORMAT,
|
||||
old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1428,7 +1428,7 @@ PSParallelCompact::compute_dense_prefix(const SpaceId id,
|
||||
"space_cap=" SIZE_FORMAT,
|
||||
space_live, space_used,
|
||||
space_capacity);
|
||||
tty->print_cr("dead_wood_limiter(%6.4f, %d)=%6.4f "
|
||||
tty->print_cr("dead_wood_limiter(%6.4f, " SIZE_FORMAT ")=%6.4f "
|
||||
"dead_wood_max=" SIZE_FORMAT " dead_wood_limit=" SIZE_FORMAT,
|
||||
density, min_percent_free, limiter,
|
||||
dead_wood_max, dead_wood_limit);
|
||||
@ -2106,7 +2106,8 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
|
||||
gclog_or_tty->print_cr(" collection: %d ",
|
||||
heap->total_collections());
|
||||
if (Verbose) {
|
||||
gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d",
|
||||
gclog_or_tty->print("old_gen_capacity: " SIZE_FORMAT
|
||||
" young_gen_capacity: " SIZE_FORMAT,
|
||||
old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
|
||||
}
|
||||
}
|
||||
@ -2559,7 +2560,7 @@ void PSParallelCompact::enqueue_region_draining_tasks(GCTaskQueue* q,
|
||||
|
||||
if (TraceParallelOldGCCompactionPhase) {
|
||||
if (Verbose && (fillable_regions & 7) != 0) gclog_or_tty->cr();
|
||||
gclog_or_tty->print_cr("%u initially fillable regions", fillable_regions);
|
||||
gclog_or_tty->print_cr(SIZE_FORMAT " initially fillable regions", fillable_regions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -330,7 +330,7 @@ oop PSPromotionManager::oop_promotion_failed(oop obj, markOop obj_mark) {
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (TraceScavenge) {
|
||||
gclog_or_tty->print_cr("{%s %s 0x%x (%d)}",
|
||||
gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " (%d)}",
|
||||
"promotion-failure",
|
||||
obj->klass()->internal_name(),
|
||||
(void *)obj, obj->size());
|
||||
|
||||
@ -510,7 +510,8 @@ bool PSScavenge::invoke_no_policy() {
|
||||
heap->total_collections());
|
||||
|
||||
if (Verbose) {
|
||||
gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d",
|
||||
gclog_or_tty->print("old_gen_capacity: " SIZE_FORMAT
|
||||
" young_gen_capacity: " SIZE_FORMAT,
|
||||
old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
|
||||
}
|
||||
}
|
||||
@ -728,7 +729,7 @@ void PSScavenge::clean_up_failed_promotion() {
|
||||
young_gen->object_iterate(&unforward_closure);
|
||||
|
||||
if (PrintGC && Verbose) {
|
||||
gclog_or_tty->print_cr("Restoring %d marks", _preserved_oop_stack.size());
|
||||
gclog_or_tty->print_cr("Restoring " SIZE_FORMAT " marks", _preserved_oop_stack.size());
|
||||
}
|
||||
|
||||
// Restore any saved marks.
|
||||
|
||||
@ -168,9 +168,9 @@ int AdaptiveSizePolicy::calc_default_active_workers(uintx total_workers,
|
||||
|
||||
if (TraceDynamicGCThreads) {
|
||||
gclog_or_tty->print_cr("GCTaskManager::calc_default_active_workers() : "
|
||||
"active_workers(): %d new_active_workers: %d "
|
||||
"prev_active_workers: %d\n"
|
||||
" active_workers_by_JT: %d active_workers_by_heap_size: %d",
|
||||
"active_workers(): " UINTX_FORMAT " new_active_workers: " UINTX_FORMAT " "
|
||||
"prev_active_workers: " UINTX_FORMAT "\n"
|
||||
" active_workers_by_JT: " UINTX_FORMAT " active_workers_by_heap_size: " UINTX_FORMAT,
|
||||
active_workers, new_active_workers, prev_active_workers,
|
||||
active_workers_by_JT, active_workers_by_heap_size);
|
||||
}
|
||||
@ -545,12 +545,12 @@ void AdaptiveSizePolicy::check_gc_overhead_limit(
|
||||
if (UseGCOverheadLimit && PrintGCDetails && Verbose) {
|
||||
if (gc_overhead_limit_exceeded()) {
|
||||
gclog_or_tty->print_cr(" GC is exceeding overhead limit "
|
||||
"of %d%%", GCTimeLimit);
|
||||
"of " UINTX_FORMAT "%%", GCTimeLimit);
|
||||
reset_gc_overhead_limit_count();
|
||||
} else if (print_gc_overhead_limit_would_be_exceeded) {
|
||||
assert(gc_overhead_limit_count() > 0, "Should not be printing");
|
||||
gclog_or_tty->print_cr(" GC would exceed overhead limit "
|
||||
"of %d%% %d consecutive time(s)",
|
||||
"of " UINTX_FORMAT "%% %d consecutive time(s)",
|
||||
GCTimeLimit, gc_overhead_limit_count());
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,8 +120,9 @@ class AllocationStats VALUE_OBJ_CLASS_SPEC {
|
||||
float delta_ise = (CMSExtrapolateSweep ? intra_sweep_estimate : 0.0);
|
||||
_desired = (ssize_t)(new_rate * (inter_sweep_estimate + delta_ise));
|
||||
if (PrintFLSStatistics > 1) {
|
||||
gclog_or_tty->print_cr("demand: %d, old_rate: %f, current_rate: %f, new_rate: %f, old_desired: %d, new_desired: %d",
|
||||
demand, old_rate, rate, new_rate, old_desired, _desired);
|
||||
gclog_or_tty->print_cr("demand: " SSIZE_FORMAT ", old_rate: %f, current_rate: %f, "
|
||||
"new_rate: %f, old_desired: " SSIZE_FORMAT ", new_desired: " SSIZE_FORMAT,
|
||||
demand, old_rate, rate, new_rate, old_desired, _desired);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ void MarkSweep::restore_marks() {
|
||||
assert(_preserved_oop_stack.size() == _preserved_mark_stack.size(),
|
||||
"inconsistent preserved oop stacks");
|
||||
if (PrintGC && Verbose) {
|
||||
gclog_or_tty->print_cr("Restoring %d marks",
|
||||
gclog_or_tty->print_cr("Restoring " SIZE_FORMAT " marks",
|
||||
_preserved_count + _preserved_oop_stack.size());
|
||||
}
|
||||
|
||||
|
||||
@ -888,7 +888,9 @@ void MutableNUMASpace::print_on(outputStream* st) const {
|
||||
for (int i = 0; i < lgrp_spaces()->length(); i++) {
|
||||
lgrp_spaces()->at(i)->accumulate_statistics(page_size());
|
||||
}
|
||||
st->print(" local/remote/unbiased/uncommitted: %dK/%dK/%dK/%dK, large/small pages: %d/%d\n",
|
||||
st->print(" local/remote/unbiased/uncommitted: " SIZE_FORMAT "K/"
|
||||
SIZE_FORMAT "K/" SIZE_FORMAT "K/" SIZE_FORMAT
|
||||
"K, large/small pages: " SIZE_FORMAT "/" SIZE_FORMAT "\n",
|
||||
ls->space_stats()->_local_space / K,
|
||||
ls->space_stats()->_remote_space / K,
|
||||
ls->space_stats()->_unbiased_space / K,
|
||||
|
||||
@ -112,7 +112,7 @@ void PLABStats::adjust_desired_plab_sz(uint no_of_gc_workers) {
|
||||
}
|
||||
_used = _allocated - _wasted - _unused;
|
||||
size_t plab_sz = _used/(target_refills*no_of_gc_workers);
|
||||
if (PrintPLAB) gclog_or_tty->print(" (plab_sz = %d ", plab_sz);
|
||||
if (PrintPLAB) gclog_or_tty->print(" (plab_sz = " SIZE_FORMAT " ", plab_sz);
|
||||
// Take historical weighted average
|
||||
_filter.sample(plab_sz);
|
||||
// Clip from above and below, and align to object boundary
|
||||
@ -120,7 +120,7 @@ void PLABStats::adjust_desired_plab_sz(uint no_of_gc_workers) {
|
||||
plab_sz = MIN2(max_size(), plab_sz);
|
||||
plab_sz = align_object_size(plab_sz);
|
||||
// Latch the result
|
||||
if (PrintPLAB) gclog_or_tty->print(" desired_plab_sz = %d) ", plab_sz);
|
||||
if (PrintPLAB) gclog_or_tty->print(" desired_plab_sz = " SIZE_FORMAT ") ", plab_sz);
|
||||
_desired_plab_sz = plab_sz;
|
||||
// Now clear the accumulators for next round:
|
||||
// note this needs to be fixed in the case where we
|
||||
|
||||
@ -84,7 +84,7 @@ void SpaceMangler::mangle_region(MemRegion mr) {
|
||||
assert(ZapUnusedHeapArea, "Mangling should not be in use");
|
||||
#ifdef ASSERT
|
||||
if(TraceZapUnusedHeapArea) {
|
||||
gclog_or_tty->print("Mangling [0x%x to 0x%x)", mr.start(), mr.end());
|
||||
gclog_or_tty->print("Mangling [" PTR_FORMAT " to " PTR_FORMAT ")", mr.start(), mr.end());
|
||||
}
|
||||
Copy::fill_to_words(mr.start(), mr.word_size(), badHeapWord);
|
||||
if(TraceZapUnusedHeapArea) {
|
||||
|
||||
@ -1205,13 +1205,13 @@ void BinaryTreeDictionary<Chunk_t, FreeList_t>::report_statistics() const {
|
||||
"------------------------------------\n");
|
||||
size_t total_size = total_chunk_size(debug_only(NULL));
|
||||
size_t free_blocks = num_free_blocks();
|
||||
gclog_or_tty->print("Total Free Space: %d\n", total_size);
|
||||
gclog_or_tty->print("Max Chunk Size: %d\n", max_chunk_size());
|
||||
gclog_or_tty->print("Number of Blocks: %d\n", free_blocks);
|
||||
gclog_or_tty->print("Total Free Space: " SIZE_FORMAT "\n", total_size);
|
||||
gclog_or_tty->print("Max Chunk Size: " SIZE_FORMAT "\n", max_chunk_size());
|
||||
gclog_or_tty->print("Number of Blocks: " SIZE_FORMAT "\n", free_blocks);
|
||||
if (free_blocks > 0) {
|
||||
gclog_or_tty->print("Av. Block Size: %d\n", total_size/free_blocks);
|
||||
gclog_or_tty->print("Av. Block Size: " SIZE_FORMAT "\n", total_size/free_blocks);
|
||||
}
|
||||
gclog_or_tty->print("Tree Height: %d\n", tree_height());
|
||||
gclog_or_tty->print("Tree Height: " SIZE_FORMAT "\n", tree_height());
|
||||
}
|
||||
|
||||
// Print census information - counts, births, deaths, etc.
|
||||
|
||||
@ -511,7 +511,7 @@ void DefNewGeneration::space_iterate(SpaceClosure* blk,
|
||||
HeapWord* DefNewGeneration::allocate_from_space(size_t size) {
|
||||
HeapWord* result = NULL;
|
||||
if (Verbose && PrintGCDetails) {
|
||||
gclog_or_tty->print("DefNewGeneration::allocate_from_space(%u):"
|
||||
gclog_or_tty->print("DefNewGeneration::allocate_from_space(" SIZE_FORMAT "):"
|
||||
" will_fail: %s"
|
||||
" heap_lock: %s"
|
||||
" free: " SIZE_FORMAT,
|
||||
@ -756,7 +756,7 @@ void DefNewGeneration::preserve_mark_if_necessary(oop obj, markOop m) {
|
||||
|
||||
void DefNewGeneration::handle_promotion_failure(oop old) {
|
||||
if (PrintPromotionFailure && !_promotion_failed) {
|
||||
gclog_or_tty->print(" (promotion failure size = " SIZE_FORMAT ") ",
|
||||
gclog_or_tty->print(" (promotion failure size = %d) ",
|
||||
old->size());
|
||||
}
|
||||
_promotion_failed = true;
|
||||
|
||||
@ -573,8 +573,8 @@ void CardGeneration::compute_new_size() {
|
||||
maximum_desired_capacity / (double) K);
|
||||
gclog_or_tty->print_cr(" "
|
||||
" shrink_bytes: %.1fK"
|
||||
" current_shrink_factor: %d"
|
||||
" new shrink factor: %d"
|
||||
" current_shrink_factor: " SIZE_FORMAT
|
||||
" new shrink factor: " SIZE_FORMAT
|
||||
" _min_heap_delta_bytes: %.1fK",
|
||||
shrink_bytes / (double) K,
|
||||
current_shrink_factor,
|
||||
|
||||
@ -257,7 +257,7 @@ void SharedHeap::print_size_transition(outputStream* out,
|
||||
size_t bytes_before,
|
||||
size_t bytes_after,
|
||||
size_t capacity) {
|
||||
out->print(" %d%s->%d%s(%d%s)",
|
||||
out->print(" " SIZE_FORMAT "%s->" SIZE_FORMAT "%s(" SIZE_FORMAT "%s)",
|
||||
byte_size_in_proper_unit(bytes_before),
|
||||
proper_unit_for_byte_size(bytes_before),
|
||||
byte_size_in_proper_unit(bytes_after),
|
||||
|
||||
@ -1324,10 +1324,12 @@ inline int build_int_from_shorts( jushort low, jushort high ) {
|
||||
#define PTR_FORMAT "0x%08" PRIxPTR
|
||||
#endif // _LP64
|
||||
|
||||
#define SSIZE_FORMAT "%" PRIdPTR
|
||||
#define SIZE_FORMAT "%" PRIuPTR
|
||||
#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR
|
||||
#define SIZE_FORMAT_W(width) "%" #width PRIuPTR
|
||||
#define SSIZE_FORMAT "%" PRIdPTR
|
||||
#define SIZE_FORMAT "%" PRIuPTR
|
||||
#define SIZE_FORMAT_HEX "0x%" PRIxPTR
|
||||
#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR
|
||||
#define SIZE_FORMAT_W(width) "%" #width PRIuPTR
|
||||
#define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR
|
||||
|
||||
#define INTX_FORMAT "%" PRIdPTR
|
||||
#define UINTX_FORMAT "%" PRIuPTR
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user