< prev index next >

src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp

Print this page




2012 
2013   // Make sure data structures are sane, make the heap parsable, and do other
2014   // miscellaneous bookkeeping.
2015   PreGCValues pre_gc_values;
2016   pre_compact(&pre_gc_values);
2017 
2018   // Get the compaction manager reserved for the VM thread.
2019   ParCompactionManager* const vmthread_cm =
2020     ParCompactionManager::manager_array(gc_task_manager()->workers());
2021 
2022   // Place after pre_compact() where the number of invocations is incremented.
2023   AdaptiveSizePolicyOutput(size_policy, heap->total_collections());
2024 
2025   {
2026     ResourceMark rm;
2027     HandleMark hm;
2028 
2029     // Set the number of GC threads to be used in this collection
2030     gc_task_manager()->set_active_gang();
2031     gc_task_manager()->task_idle_workers();
2032     heap->set_par_threads(gc_task_manager()->active_workers());
2033 
2034     TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
2035     GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer.gc_id());
2036     TraceCollectorStats tcs(counters());
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 




2012 
2013   // Make sure data structures are sane, make the heap parsable, and do other
2014   // miscellaneous bookkeeping.
2015   PreGCValues pre_gc_values;
2016   pre_compact(&pre_gc_values);
2017 
2018   // Get the compaction manager reserved for the VM thread.
2019   ParCompactionManager* const vmthread_cm =
2020     ParCompactionManager::manager_array(gc_task_manager()->workers());
2021 
2022   // Place after pre_compact() where the number of invocations is incremented.
2023   AdaptiveSizePolicyOutput(size_policy, heap->total_collections());
2024 
2025   {
2026     ResourceMark rm;
2027     HandleMark hm;
2028 
2029     // Set the number of GC threads to be used in this collection
2030     gc_task_manager()->set_active_gang();
2031     gc_task_manager()->task_idle_workers();

2032 
2033     TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
2034     GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer.gc_id());
2035     TraceCollectorStats tcs(counters());
2036     TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
2037 
2038     if (TraceOldGenTime) accumulated_time()->start();
2039 
2040     // Let the size policy know we're starting
2041     size_policy->major_collection_begin();
2042 
2043     CodeCache::gc_prologue();
2044 
2045     COMPILER2_PRESENT(DerivedPointerTable::clear());
2046 
2047     ref_processor()->enable_discovery();
2048     ref_processor()->setup_policy(maximum_heap_compaction);
2049 
2050     bool marked_for_unloading = false;
2051 


< prev index next >