< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 47825 : 8189733: Cleanup Full GC setup and tear down
Reviewed-by:
@@ -37,11 +37,10 @@
#include "gc/g1/g1CollectorState.hpp"
#include "gc/g1/g1ConcurrentRefine.hpp"
#include "gc/g1/g1ConcurrentRefineThread.hpp"
#include "gc/g1/g1EvacStats.inline.hpp"
#include "gc/g1/g1FullCollector.hpp"
-#include "gc/g1/g1FullGCScope.hpp"
#include "gc/g1/g1GCPhaseTimes.hpp"
#include "gc/g1/g1HeapSizingPolicy.hpp"
#include "gc/g1/g1HeapTransition.hpp"
#include "gc/g1/g1HeapVerifier.hpp"
#include "gc/g1/g1HotCardCache.hpp"
@@ -1215,38 +1214,10 @@
#ifdef TRACESPINNING
ParallelTaskTerminator::print_termination_counts();
#endif
}
-void G1CollectedHeap::do_full_collection_inner(G1FullGCScope* scope) {
- GCTraceTime(Info, gc) tm("Pause Full", NULL, gc_cause(), true);
- g1_policy()->record_full_collection_start();
-
- print_heap_before_gc();
- print_heap_regions();
-
- abort_concurrent_cycle();
- verify_before_full_collection(scope->is_explicit_gc());
-
- gc_prologue(true);
- prepare_heap_for_full_collection();
-
- G1FullCollector collector(scope, ref_processor_stw(), concurrent_mark()->next_mark_bitmap(), workers()->active_workers());
- collector.prepare_collection();
- collector.collect();
- collector.complete_collection();
-
- prepare_heap_for_mutators();
-
- g1_policy()->record_full_collection_end();
- gc_epilogue(true);
-
- verify_after_full_collection();
-
- print_heap_after_full_collection(scope->heap_transition());
-}
-
bool G1CollectedHeap::do_full_collection(bool explicit_gc,
bool clear_all_soft_refs) {
assert_at_safepoint(true /* should_be_vm_thread */);
if (GCLocker::check_active_before_gc()) {
@@ -1255,12 +1226,16 @@
}
const bool do_clear_all_soft_refs = clear_all_soft_refs ||
collector_policy()->should_clear_all_soft_refs();
- G1FullGCScope scope(explicit_gc, do_clear_all_soft_refs);
- do_full_collection_inner(&scope);
+ G1FullCollector collector(this, explicit_gc, do_clear_all_soft_refs);
+ GCTraceTime(Info, gc) tm("Pause Full", NULL, gc_cause(), true);
+
+ collector.prepare_collection();
+ collector.collect();
+ collector.complete_collection();
// Full collection was successfully completed.
return true;
}
< prev index next >