3519
3520 void G1CollectedHeap::print_all_rsets() {
3521 PrintRSetsClosure cl("Printing All RSets");;
3522 heap_region_iterate(&cl);
3523 }
3524 #endif // PRODUCT
3525
3526 G1CollectedHeap* G1CollectedHeap::heap() {
3527 assert(_sh->kind() == CollectedHeap::G1CollectedHeap,
3528 "not a garbage-first heap");
3529 return _g1h;
3530 }
3531
3532 void G1CollectedHeap::gc_prologue(bool full /* Ignored */) {
3533 // always_do_update_barrier = false;
3534 assert(InlineCacheBuffer::is_empty(), "should have cleaned up ICBuffer");
3535 // Call allocation profiler
3536 AllocationProfiler::iterate_since_last_gc();
3537 // Fill TLAB's and such
3538 ensure_parsability(true);
3539 }
3540
3541 void G1CollectedHeap::gc_epilogue(bool full /* Ignored */) {
3542
3543 if (G1SummarizeRSetStats &&
3544 (G1SummarizeRSetStatsPeriod > 0) &&
3545 // we are at the end of the GC. Total collections has already been increased.
3546 ((total_collections() - 1) % G1SummarizeRSetStatsPeriod == 0)) {
3547 g1_rem_set()->print_periodic_summary_info();
3548 }
3549
3550 // FIXME: what is this about?
3551 // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
3552 // is set.
3553 COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(),
3554 "derived pointer present"));
3555 // always_do_update_barrier = true;
3556
3557 // We have just completed a GC. Update the soft reference
3558 // policy with the new heap occupancy
3559 Universe::update_heap_info_at_gc();
3560 }
3561
3562 HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
3563 unsigned int gc_count_before,
3564 bool* succeeded) {
3565 assert_heap_not_locked_and_not_at_safepoint();
3566 g1_policy()->record_stop_world_start();
3567 VM_G1IncCollectionPause op(gc_count_before,
|
3519
3520 void G1CollectedHeap::print_all_rsets() {
3521 PrintRSetsClosure cl("Printing All RSets");;
3522 heap_region_iterate(&cl);
3523 }
3524 #endif // PRODUCT
3525
3526 G1CollectedHeap* G1CollectedHeap::heap() {
3527 assert(_sh->kind() == CollectedHeap::G1CollectedHeap,
3528 "not a garbage-first heap");
3529 return _g1h;
3530 }
3531
3532 void G1CollectedHeap::gc_prologue(bool full /* Ignored */) {
3533 // always_do_update_barrier = false;
3534 assert(InlineCacheBuffer::is_empty(), "should have cleaned up ICBuffer");
3535 // Call allocation profiler
3536 AllocationProfiler::iterate_since_last_gc();
3537 // Fill TLAB's and such
3538 ensure_parsability(true);
3539
3540 if (G1SummarizeRSetStats && (G1SummarizeRSetStatsPeriod > 0) &&
3541 (total_collections() % G1SummarizeRSetStatsPeriod == 0)) {
3542 g1_rem_set()->print_periodic_summary_info("Before GC RS summary");
3543 }
3544 }
3545
3546 void G1CollectedHeap::gc_epilogue(bool full /* Ignored */) {
3547
3548 if (G1SummarizeRSetStats &&
3549 (G1SummarizeRSetStatsPeriod > 0) &&
3550 // we are at the end of the GC. Total collections has already been increased.
3551 ((total_collections() - 1) % G1SummarizeRSetStatsPeriod == 0)) {
3552 g1_rem_set()->print_periodic_summary_info("After GC RS summary");
3553 }
3554
3555 // FIXME: what is this about?
3556 // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
3557 // is set.
3558 COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(),
3559 "derived pointer present"));
3560 // always_do_update_barrier = true;
3561
3562 // We have just completed a GC. Update the soft reference
3563 // policy with the new heap occupancy
3564 Universe::update_heap_info_at_gc();
3565 }
3566
3567 HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
3568 unsigned int gc_count_before,
3569 bool* succeeded) {
3570 assert_heap_not_locked_and_not_at_safepoint();
3571 g1_policy()->record_stop_world_start();
3572 VM_G1IncCollectionPause op(gc_count_before,
|