< prev index next >

src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp

8224665: Parallel GC: Use WorkGang (7: remove task manager)

8224659: Parallel GC: Use WorkGang (1: PCRefProcTask)
 #include "gc/shared/gcPolicyCounters.hpp"
 #include "gc/shared/gcWhen.hpp"
 #include "gc/shared/referenceProcessor.hpp"
 #include "gc/shared/softRefPolicy.hpp"
 #include "gc/shared/strongRootsScope.hpp"
+#include "gc/shared/workgroup.hpp"
 #include "logging/log.hpp"
 #include "memory/metaspace.hpp"
 #include "utilities/growableArray.hpp"
 #include "utilities/ostream.hpp"
 
 class AdjoiningGenerations;
 class GCHeapSummary;
-class GCTaskManager;
 class MemoryManager;
 class MemoryPool;
 class PSAdaptiveSizePolicy;
 class PSCardTable;
 class PSHeapSummary;

@@ -65,20 +65,19 // Collection of generations that are adjacent in the // space reserved for the heap. AdjoiningGenerations* _gens; unsigned int _death_march_count; - // The task manager - static GCTaskManager* _gc_task_manager; - GCMemoryManager* _young_manager; GCMemoryManager* _old_manager; MemoryPool* _eden_pool; MemoryPool* _survivor_pool; MemoryPool* _old_pool; + WorkGang _workers; + virtual void initialize_serviceability(); void trace_heap(GCWhen::Type when, const GCTracer* tracer); protected:
@@ -96,11 +95,14 _death_march_count(0), _young_manager(NULL), _old_manager(NULL), _eden_pool(NULL), _survivor_pool(NULL), - _old_pool(NULL) { } + _old_pool(NULL), + _workers("GC Thread", ParallelGCThreads, + true /* are_GC_task_threads */, + false /* are_ConcurrentGC_threads */) { } // For use by VM operations enum CollectionType { Scavenge, MarkSweep
@@ -126,12 +128,10 static PSGCAdaptivePolicyCounters* gc_policy_counters() { return _gc_policy_counters; } static ParallelScavengeHeap* heap(); - static GCTaskManager* const gc_task_manager() { return _gc_task_manager; } - CardTableBarrierSet* barrier_set(); PSCardTable* card_table(); AdjoiningGenerations* gens() { return _gens; }
@@ -246,10 +246,14 ~ParStrongRootsScope(); }; GCMemoryManager* old_gc_manager() const { return _old_manager; } GCMemoryManager* young_gc_manager() const { return _young_manager; } + + WorkGang& workers() { + return _workers; + } }; // Simple class for storing info about the heap at the start of GC, to be used // after GC for comparison/printing. class PreGCValues {
< prev index next >