src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 4654 : [mq]: 8013895
rev 4655 : [mq]: 8014078


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 &&
3541       (G1SummarizeRSetStatsPeriod > 0) && ((G1SummarizeRSetStatsTime & 2) != 0) &&
3542       // we are at the end of the GC. Total collections has already been increased.
3543       (total_collections() % G1SummarizeRSetStatsPeriod == 0)) {
3544     g1_rem_set()->print_periodic_summary_info("Before GC RS summary");
3545   }
3546 }
3547 
3548 void G1CollectedHeap::gc_epilogue(bool full /* Ignored */) {
3549 
3550   if (G1SummarizeRSetStats &&
3551       (G1SummarizeRSetStatsPeriod > 0) && ((G1SummarizeRSetStatsTime & 1) != 0) &&
3552       // we are at the end of the GC. Total collections has already been increased.
3553       ((total_collections() - 1) % G1SummarizeRSetStatsPeriod == 0)) {
3554     g1_rem_set()->print_periodic_summary_info("After GC RS summary");
3555   }
3556 
3557   // FIXME: what is this about?
3558   // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
3559   // is set.
3560   COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(),
3561                         "derived pointer present"));
3562   // always_do_update_barrier = true;
3563 
3564   // We have just completed a GC. Update the soft reference
3565   // policy with the new heap occupancy
3566   Universe::update_heap_info_at_gc();
3567 }
3568 
3569 HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
3570                                                unsigned int gc_count_before,
3571                                                bool* succeeded) {
3572   assert_heap_not_locked_and_not_at_safepoint();
3573   g1_policy()->record_stop_world_start();
3574   VM_G1IncCollectionPause op(gc_count_before,