Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 22894:2af69bed8db6
8058801: G1TraceReclaimDeadHumongousObjectsAtYoungGC only prints humongous object liveness output when there is at least one candidate humongous object
Summary: If G1TraceReclaimDeadHumongousObjectsAtYoungGC is enabled, always print humongous object liveness output.
Reviewed-by: tschatzl
Contributed-by: sangheon.kim@oracle.com
author | tschatzl |
---|---|
date | Fri, 10 Oct 2014 12:15:51 +0200 |
parents | f74dbdd45754 |
children | f2e3f0e1f97d |
comparison
equal
deleted
inserted
replaced
22892:951689652d2c | 22894:2af69bed8db6 |
---|---|
3718 heap_region_iterate(&cl); | 3718 heap_region_iterate(&cl); |
3719 g1_policy()->phase_times()->record_fast_reclaim_humongous_stats(cl.total_humongous(), | 3719 g1_policy()->phase_times()->record_fast_reclaim_humongous_stats(cl.total_humongous(), |
3720 cl.candidate_humongous()); | 3720 cl.candidate_humongous()); |
3721 _has_humongous_reclaim_candidates = cl.candidate_humongous() > 0; | 3721 _has_humongous_reclaim_candidates = cl.candidate_humongous() > 0; |
3722 | 3722 |
3723 if (_has_humongous_reclaim_candidates) { | 3723 if (_has_humongous_reclaim_candidates || G1TraceReclaimDeadHumongousObjectsAtYoungGC) { |
3724 clear_humongous_is_live_table(); | 3724 clear_humongous_is_live_table(); |
3725 } | 3725 } |
3726 } | 3726 } |
3727 | 3727 |
3728 void | 3728 void |
6418 uint region_idx = r->hrm_index(); | 6418 uint region_idx = r->hrm_index(); |
6419 if (g1h->humongous_is_live(region_idx) || | 6419 if (g1h->humongous_is_live(region_idx) || |
6420 g1h->humongous_region_is_always_live(region_idx)) { | 6420 g1h->humongous_region_is_always_live(region_idx)) { |
6421 | 6421 |
6422 if (G1TraceReclaimDeadHumongousObjectsAtYoungGC) { | 6422 if (G1TraceReclaimDeadHumongousObjectsAtYoungGC) { |
6423 gclog_or_tty->print_cr("Live humongous %d region %d with remset "SIZE_FORMAT" code roots "SIZE_FORMAT" is marked %d live-other %d obj array %d", | 6423 gclog_or_tty->print_cr("Live humongous %d region %d size "SIZE_FORMAT" with remset "SIZE_FORMAT" code roots "SIZE_FORMAT" is marked %d live-other %d obj array %d", |
6424 r->isHumongous(), | 6424 r->isHumongous(), |
6425 region_idx, | 6425 region_idx, |
6426 obj->size()*HeapWordSize, | |
6426 r->rem_set()->occupied(), | 6427 r->rem_set()->occupied(), |
6427 r->rem_set()->strong_code_roots_list_length(), | 6428 r->rem_set()->strong_code_roots_list_length(), |
6428 next_bitmap->isMarked(r->bottom()), | 6429 next_bitmap->isMarked(r->bottom()), |
6429 g1h->humongous_is_live(region_idx), | 6430 g1h->humongous_is_live(region_idx), |
6430 obj->is_objArray() | 6431 obj->is_objArray() |
6437 guarantee(!obj->is_objArray(), | 6438 guarantee(!obj->is_objArray(), |
6438 err_msg("Eagerly reclaiming object arrays is not supported, but the object "PTR_FORMAT" is.", | 6439 err_msg("Eagerly reclaiming object arrays is not supported, but the object "PTR_FORMAT" is.", |
6439 r->bottom())); | 6440 r->bottom())); |
6440 | 6441 |
6441 if (G1TraceReclaimDeadHumongousObjectsAtYoungGC) { | 6442 if (G1TraceReclaimDeadHumongousObjectsAtYoungGC) { |
6442 gclog_or_tty->print_cr("Reclaim humongous region %d start "PTR_FORMAT" region %d length "UINT32_FORMAT" with remset "SIZE_FORMAT" code roots "SIZE_FORMAT" is marked %d live-other %d obj array %d", | 6443 gclog_or_tty->print_cr("Reclaim humongous region %d size "SIZE_FORMAT" start "PTR_FORMAT" region %d length "UINT32_FORMAT" with remset "SIZE_FORMAT" code roots "SIZE_FORMAT" is marked %d live-other ", |
6443 r->isHumongous(), | 6444 r->isHumongous(), |
6445 obj->size()*HeapWordSize, | |
6444 r->bottom(), | 6446 r->bottom(), |
6445 region_idx, | 6447 region_idx, |
6446 r->region_num(), | 6448 r->region_num(), |
6447 r->rem_set()->occupied(), | 6449 r->rem_set()->occupied(), |
6448 r->rem_set()->strong_code_roots_list_length(), | 6450 r->rem_set()->strong_code_roots_list_length(), |
6477 }; | 6479 }; |
6478 | 6480 |
6479 void G1CollectedHeap::eagerly_reclaim_humongous_regions() { | 6481 void G1CollectedHeap::eagerly_reclaim_humongous_regions() { |
6480 assert_at_safepoint(true); | 6482 assert_at_safepoint(true); |
6481 | 6483 |
6482 if (!G1ReclaimDeadHumongousObjectsAtYoungGC || !_has_humongous_reclaim_candidates) { | 6484 if (!G1ReclaimDeadHumongousObjectsAtYoungGC || |
6485 (!_has_humongous_reclaim_candidates && !G1TraceReclaimDeadHumongousObjectsAtYoungGC)) { | |
6483 g1_policy()->phase_times()->record_fast_reclaim_humongous_time_ms(0.0, 0); | 6486 g1_policy()->phase_times()->record_fast_reclaim_humongous_time_ms(0.0, 0); |
6484 return; | 6487 return; |
6485 } | 6488 } |
6486 | 6489 |
6487 double start_time = os::elapsedTime(); | 6490 double start_time = os::elapsedTime(); |