@@ -1115,14 +1115,14 @@ PSParallelCompact::compute_dense_prefix_via_density(const SpaceId id,
(1.0 - cur_density) * (1.0 - cur_density) * cur_density * cur_density;
const size_t deadwood_goal = size_t (space_capacity * deadwood_density);
if (TraceParallelOldGCDensePrefix) {
tty-> print_cr ( " cur_dens=%5.3f dw_dens=%5.3f dw_goal=" SIZE_FORMAT,
cur_density, deadwood_density, deadwood_goal);
tty-> print_cr ( " space_live= " SIZE_FORMAT " " " space_used= " SIZE_FORMAT " "
" space_cap =" SIZE_FORMAT,
space_live, space_used ,
space_capacity);
}
log_develop_debug (gc, compaction)(
" cur_dens=%5.3f dw_dens=%5.3f dw_goal=" SIZE_FORMAT,
cur_density, deadwood_density, deadwood_goal);
log_develop_debug (gc, compaction)(
" space_live= " SIZE_FORMAT " space_used =" SIZE_FORMAT " "
" space_cap= " SIZE_FORMAT ,
space_live, space_used,
space_capacity);
// XXX - Use binary search?
HeapWord* dense_prefix = sd.region_to_addr (cp);
@@ -1131,12 +1131,12 @@ PSParallelCompact::compute_dense_prefix_via_density(const SpaceId id,
while (cp < end_cp) {
HeapWord* region_destination = cp->destination ();
const size_t cur_deadwood = pointer_delta (dense_prefix, region_destination);
if (TraceParallelOldGCDensePrefix && Verbose) {
tty-> print_cr ( " c#= " SIZE_FORMAT_W ( 4 ) " dst= " PTR_FORMAT " "
" dp =" PTR_FORMAT " " " cdw= " SIZE_FORMAT_W ( 8 ),
sd. region (cp), p2i (region_destination ),
p2i (dense_prefix ), cur_deadwood);
}
log_develop_trace (gc, compaction)(
" c# =" SIZE_FORMAT_W ( 4 ) " dst= " PTR_FORMAT " "
" dp= " PTR_FORMAT " cdw= " SIZE_FORMAT_W ( 8 ),
sd. region (cp ), p2i (region_destination),
p2i (dense_prefix), cur_deadwood);
if (cur_deadwood >= deadwood_goal) {
// Found the region that has the correct amount of deadwood to the left.
@@ -1158,11 +1158,13 @@ PSParallelCompact::compute_dense_prefix_via_density(const SpaceId id,
if (density_to_right <= prev_region_density_to_right) {
return dense_prefix;
}
if (TraceParallelOldGCDensePrefix && Verbose) {
tty->print_cr (" backing up from c=" SIZE_FORMAT_W (4 ) " d2r=%10.8f "
" pc_d2r=%10.8f" , sd.region (cp), density_to_right,
prev_region_density_to_right);
}
log_develop_trace (gc, compaction)(
" backing up from c=" SIZE_FORMAT_W (4 ) " d2r=%10.8f "
" pc_d2r=%10.8f" ,
sd.region (cp), density_to_right,
prev_region_density_to_right);
dense_prefix -= region_size;
live_to_right = prev_region_live_to_right;
space_to_right = prev_region_space_to_right;
@@ -1196,16 +1198,17 @@ void PSParallelCompact::print_dense_prefix_stats(const char* const algorithm,
const size_t live_to_right = new_top - cp->destination ();
const size_t dead_to_right = space->top () - addr - live_to_right;
tty->print_cr (" %s=" PTR_FORMAT " dpc=" SIZE_FORMAT_W (5 ) " "
" spl=" SIZE_FORMAT " "
" d2l=" SIZE_FORMAT " d2l%%=%6.4f "
" d2r=" SIZE_FORMAT " l2r=" SIZE_FORMAT
" ratio=%10.8f" ,
algorithm, p2i (addr), region_idx,
space_live,
dead_to_left, dead_to_left_pct,
dead_to_right, live_to_right,
double (dead_to_right) / live_to_right);
log_develop_debug (gc, compaction)(
" %s=" PTR_FORMAT " dpc=" SIZE_FORMAT_W (5 ) " "
" spl=" SIZE_FORMAT " "
" d2l=" SIZE_FORMAT " d2l%%=%6.4f "
" d2r=" SIZE_FORMAT " l2r=" SIZE_FORMAT " "
" ratio=%10.8f" ,
algorithm, p2i (addr), region_idx,
space_live,
dead_to_left, dead_to_left_pct,
dead_to_right, live_to_right,
double (dead_to_right) / live_to_right);
}
#endif // #ifndef PRODUCT
@@ -1413,16 +1416,16 @@ PSParallelCompact::compute_dense_prefix(const SpaceId id,
const size_t dead_wood_limit = MIN2 (size_t (space_capacity * limiter),
dead_wood_max);
if (TraceParallelOldGCDensePrefix) {
tty-> print_cr ( " space_live=" SIZE_FORMAT " " " space_used=" SIZE_FORMAT " "
" space_cap=" SIZE_FORMAT,
space_live, space_used,
space_capacity);
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);
}
log_develop_debug (gc, compaction)(
" space_live=" SIZE_FORMAT " space_used=" SIZE_FORMAT " "
" space_cap=" SIZE_FORMAT,
space_live, space_used,
space_capacity);
log_develop_debug (gc, compaction)(
" 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);
// Locate the region with the desired amount of dead space to the left.
const RegionData* const limit_cp =
@@ -1536,7 +1539,7 @@ PSParallelCompact::summarize_space(SpaceId id, bool maximum_compaction)
_space_info[id].set_dense_prefix (dense_prefix_end);
#ifndef PRODUCT
if (TraceParallelOldGCDensePrefix ) {
if (log_is_enabled (Debug, gc, compaction) ) {
print_dense_prefix_stats (" ratio" , id, maximum_compaction,
dense_prefix_end);
HeapWord* addr = compute_dense_prefix_via_density (id, maximum_compaction);
@@ -1610,16 +1613,16 @@ void PSParallelCompact::summary_phase(ParCompactionManager* cm,
{
GCTraceTime (Info, gc, phases) tm (" Summary Phase" , &_gc_timer);
# ifdef ASSERT
if (TraceParallelOldGCMarkingPhase) {
tty-> print_cr ( " add_obj_count =" SIZE_FORMAT " "
" add_obj_bytes= " SIZE_FORMAT ,
add_obj_count, add_obj_size * HeapWordSize);
tty-> print_cr ( " mark_bitmap_count= " SIZE_FORMAT " "
" mark_bitmap_bytes =" SIZE_FORMAT,
mark_bitmap_count, mark_bitmap_size * HeapWordSize);
}
# endif // #ifdef ASSERT
log_develop_debug (gc, marking)(
" add_obj_count= " SIZE_FORMAT " "
" add_obj_bytes =" SIZE_FORMAT,
add_obj_count ,
add_obj_size * HeapWordSize);
log_develop_debug (gc, marking)(
" mark_bitmap_count =" SIZE_FORMAT " "
" mark_bitmap_bytes= " SIZE_FORMAT,
mark_bitmap_count,
mark_bitmap_size * HeapWordSize);
// Quick summarization of each space into itself, to see how much is live.
summarize_spaces_quick ();