2037 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
2038
2039 if (TraceOldGenTime) accumulated_time()->start();
2040
2041 // Let the size policy know we're starting
2042 size_policy->major_collection_begin();
2043
2044 CodeCache::gc_prologue();
2045
2046 COMPILER2_PRESENT(DerivedPointerTable::clear());
2047
2048 ref_processor()->enable_discovery();
2049 ref_processor()->setup_policy(maximum_heap_compaction);
2050
2051 bool marked_for_unloading = false;
2052
2053 marking_start.update();
2054 marking_phase(vmthread_cm, maximum_heap_compaction, &_gc_tracer);
2055
2056 bool max_on_system_gc = UseMaximumCompactionOnSystemGC
2057 && gc_cause == GCCause::_java_lang_system_gc;
2058 summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc);
2059
2060 COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity"));
2061 COMPILER2_PRESENT(DerivedPointerTable::set_active(false));
2062
2063 // adjust_roots() updates Universe::_intArrayKlassObj which is
2064 // needed by the compaction for filling holes in the dense prefix.
2065 adjust_roots();
2066
2067 compaction_start.update();
2068 compact();
2069
2070 // Reset the mark bitmap, summary data, and do other bookkeeping. Must be
2071 // done before resizing.
2072 post_compact();
2073
2074 // Let the size policy know we're done
2075 size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
2076
2077 if (UseAdaptiveSizePolicy) {
|
2037 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
2038
2039 if (TraceOldGenTime) accumulated_time()->start();
2040
2041 // Let the size policy know we're starting
2042 size_policy->major_collection_begin();
2043
2044 CodeCache::gc_prologue();
2045
2046 COMPILER2_PRESENT(DerivedPointerTable::clear());
2047
2048 ref_processor()->enable_discovery();
2049 ref_processor()->setup_policy(maximum_heap_compaction);
2050
2051 bool marked_for_unloading = false;
2052
2053 marking_start.update();
2054 marking_phase(vmthread_cm, maximum_heap_compaction, &_gc_tracer);
2055
2056 bool max_on_system_gc = UseMaximumCompactionOnSystemGC
2057 && GCCause::is_system_gc(gc_cause);
2058 summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc);
2059
2060 COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity"));
2061 COMPILER2_PRESENT(DerivedPointerTable::set_active(false));
2062
2063 // adjust_roots() updates Universe::_intArrayKlassObj which is
2064 // needed by the compaction for filling holes in the dense prefix.
2065 adjust_roots();
2066
2067 compaction_start.update();
2068 compact();
2069
2070 // Reset the mark bitmap, summary data, and do other bookkeeping. Must be
2071 // done before resizing.
2072 post_compact();
2073
2074 // Let the size policy know we're done
2075 size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
2076
2077 if (UseAdaptiveSizePolicy) {
|