2052
2053 // Set the number of GC threads to be used in this collection
2054 gc_task_manager()->set_active_gang();
2055 gc_task_manager()->task_idle_workers();
2056 heap->set_par_threads(gc_task_manager()->active_workers());
2057
2058 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
2059 GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer.gc_id());
2060 TraceCollectorStats tcs(counters());
2061 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
2062
2063 if (TraceOldGenTime) accumulated_time()->start();
2064
2065 // Let the size policy know we're starting
2066 size_policy->major_collection_begin();
2067
2068 CodeCache::gc_prologue();
2069
2070 COMPILER2_PRESENT(DerivedPointerTable::clear());
2071
2072 ref_processor()->enable_discovery(true /*verify_disabled*/, true /*verify_no_refs*/);
2073 ref_processor()->setup_policy(maximum_heap_compaction);
2074
2075 bool marked_for_unloading = false;
2076
2077 marking_start.update();
2078 marking_phase(vmthread_cm, maximum_heap_compaction, &_gc_tracer);
2079
2080 bool max_on_system_gc = UseMaximumCompactionOnSystemGC
2081 && gc_cause == GCCause::_java_lang_system_gc;
2082 summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc);
2083
2084 COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity"));
2085 COMPILER2_PRESENT(DerivedPointerTable::set_active(false));
2086
2087 // adjust_roots() updates Universe::_intArrayKlassObj which is
2088 // needed by the compaction for filling holes in the dense prefix.
2089 adjust_roots();
2090
2091 compaction_start.update();
2092 compact();
|
2052
2053 // Set the number of GC threads to be used in this collection
2054 gc_task_manager()->set_active_gang();
2055 gc_task_manager()->task_idle_workers();
2056 heap->set_par_threads(gc_task_manager()->active_workers());
2057
2058 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
2059 GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer.gc_id());
2060 TraceCollectorStats tcs(counters());
2061 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
2062
2063 if (TraceOldGenTime) accumulated_time()->start();
2064
2065 // Let the size policy know we're starting
2066 size_policy->major_collection_begin();
2067
2068 CodeCache::gc_prologue();
2069
2070 COMPILER2_PRESENT(DerivedPointerTable::clear());
2071
2072 ref_processor()->enable_discovery();
2073 ref_processor()->setup_policy(maximum_heap_compaction);
2074
2075 bool marked_for_unloading = false;
2076
2077 marking_start.update();
2078 marking_phase(vmthread_cm, maximum_heap_compaction, &_gc_tracer);
2079
2080 bool max_on_system_gc = UseMaximumCompactionOnSystemGC
2081 && gc_cause == GCCause::_java_lang_system_gc;
2082 summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc);
2083
2084 COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity"));
2085 COMPILER2_PRESENT(DerivedPointerTable::set_active(false));
2086
2087 // adjust_roots() updates Universe::_intArrayKlassObj which is
2088 // needed by the compaction for filling holes in the dense prefix.
2089 adjust_roots();
2090
2091 compaction_start.update();
2092 compact();
|