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

Print this page




3660   collection_set_iterate(&cl);
3661 }
3662 
3663 void G1CollectedHeap::print_all_rsets() {
3664   PrintRSetsClosure cl("Printing All RSets");;
3665   heap_region_iterate(&cl);
3666 }
3667 #endif // PRODUCT
3668 
3669 G1CollectedHeap* G1CollectedHeap::heap() {
3670   assert(_sh->kind() == CollectedHeap::G1CollectedHeap,
3671          "not a garbage-first heap");
3672   return _g1h;
3673 }
3674 
3675 void G1CollectedHeap::gc_prologue(bool full /* Ignored */) {
3676   // always_do_update_barrier = false;
3677   assert(InlineCacheBuffer::is_empty(), "should have cleaned up ICBuffer");
3678   // Fill TLAB's and such
3679   ensure_parsability(true);





3680 }
3681 
3682 void G1CollectedHeap::gc_epilogue(bool full /* Ignored */) {
3683 
3684   if (G1SummarizeRSetStats &&
3685       (G1SummarizeRSetStatsPeriod > 0) &&
3686       // we are at the end of the GC. Total collections has already been increased.
3687       ((total_collections() - 1) % G1SummarizeRSetStatsPeriod == 0)) {
3688     g1_rem_set()->print_periodic_summary_info();
3689   }
3690 
3691   // FIXME: what is this about?
3692   // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
3693   // is set.
3694   COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(),
3695                         "derived pointer present"));
3696   // always_do_update_barrier = true;
3697 
3698   // We have just completed a GC. Update the soft reference
3699   // policy with the new heap occupancy
3700   Universe::update_heap_info_at_gc();
3701 }
3702 
3703 HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
3704                                                unsigned int gc_count_before,
3705                                                bool* succeeded,
3706                                                GCCause::Cause gc_cause) {
3707   assert_heap_not_locked_and_not_at_safepoint();
3708   g1_policy()->record_stop_world_start();




3660   collection_set_iterate(&cl);
3661 }
3662 
3663 void G1CollectedHeap::print_all_rsets() {
3664   PrintRSetsClosure cl("Printing All RSets");;
3665   heap_region_iterate(&cl);
3666 }
3667 #endif // PRODUCT
3668 
3669 G1CollectedHeap* G1CollectedHeap::heap() {
3670   assert(_sh->kind() == CollectedHeap::G1CollectedHeap,
3671          "not a garbage-first heap");
3672   return _g1h;
3673 }
3674 
3675 void G1CollectedHeap::gc_prologue(bool full /* Ignored */) {
3676   // always_do_update_barrier = false;
3677   assert(InlineCacheBuffer::is_empty(), "should have cleaned up ICBuffer");
3678   // Fill TLAB's and such
3679   ensure_parsability(true);
3680 
3681   if (G1SummarizeRSetStats && (G1SummarizeRSetStatsPeriod > 0) &&
3682       (total_collections() % G1SummarizeRSetStatsPeriod == 0)) {
3683     g1_rem_set()->print_periodic_summary_info("Before GC RS summary");
3684   }
3685 }
3686 
3687 void G1CollectedHeap::gc_epilogue(bool full /* Ignored */) {
3688 
3689   if (G1SummarizeRSetStats &&
3690       (G1SummarizeRSetStatsPeriod > 0) &&
3691       // we are at the end of the GC. Total collections has already been increased.
3692       ((total_collections() - 1) % G1SummarizeRSetStatsPeriod == 0)) {
3693     g1_rem_set()->print_periodic_summary_info("After GC RS summary");
3694   }
3695 
3696   // FIXME: what is this about?
3697   // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
3698   // is set.
3699   COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(),
3700                         "derived pointer present"));
3701   // always_do_update_barrier = true;
3702 
3703   // We have just completed a GC. Update the soft reference
3704   // policy with the new heap occupancy
3705   Universe::update_heap_info_at_gc();
3706 }
3707 
3708 HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
3709                                                unsigned int gc_count_before,
3710                                                bool* succeeded,
3711                                                GCCause::Cause gc_cause) {
3712   assert_heap_not_locked_and_not_at_safepoint();
3713   g1_policy()->record_stop_world_start();