Print this page
Abort concurrent mark

*** 1022,1032 **** _ref_processor_cm->abandon_partial_discovery(); _ref_processor_cm->verify_no_references_recorded(); // Abandon current iterations of concurrent marking and concurrent // refinement, if any are in progress. ! concurrent_mark()->concurrent_cycle_abort(); } void G1CollectedHeap::prepare_heap_for_full_collection() { // Make sure we'll choose a new allocation region afterwards. _allocator->release_mutator_alloc_regions(); --- 1022,1032 ---- _ref_processor_cm->abandon_partial_discovery(); _ref_processor_cm->verify_no_references_recorded(); // Abandon current iterations of concurrent marking and concurrent // refinement, if any are in progress. ! concurrent_mark()->concurrent_cycle_abort_by_fullgc(); } void G1CollectedHeap::prepare_heap_for_full_collection() { // Make sure we'll choose a new allocation region afterwards. _allocator->release_mutator_alloc_regions();
*** 3134,3144 **** start_new_collection_set(); _survivor_evac_stats.adjust_desired_plab_sz(); _old_evac_stats.adjust_desired_plab_sz(); ! if (should_start_conc_mark) { // We have to do this before we notify the CM threads that // they can start working to make sure that all the // appropriate initialization is done on the CM object. concurrent_mark()->post_initial_mark(); // Note that we don't actually trigger the CM thread at --- 3134,3152 ---- start_new_collection_set(); _survivor_evac_stats.adjust_desired_plab_sz(); _old_evac_stats.adjust_desired_plab_sz(); ! if (gc_cause() == GCCause::_g1_humongous_allocation && collector_state()->in_initial_mark_gc()) { ! // Check if we still need to do concurrent mark after evacuation ! // Abort concurrent mark in case we cleaned humongous objects via eager reclaim ! if (!policy()->need_to_start_conc_mark("end of GC")) { ! concurrent_mark()->concurrent_cycle_abort_by_initial_mark(); ! } ! } ! ! if (should_start_conc_mark && !concurrent_mark()->aborted_by_initial_mark()) { // We have to do this before we notify the CM threads that // they can start working to make sure that all the // appropriate initialization is done on the CM object. concurrent_mark()->post_initial_mark(); // Note that we don't actually trigger the CM thread at