< prev index next >

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

8224663: Parallel GC: Use WorkGang (5: ScavengeRootsTask)

33 #include "utilities/globalDefinitions.hpp"                                                                                 
34 
35 //                                                                                                                         
36 // psPromotionManager is used by a single thread to manage object survival                                                 
37 // during a scavenge. The promotion manager contains thread local data only.                                               
38 //                                                                                                                         
39 // NOTE! Be careful when allocating the stacks on cheap. If you are going                                                  
40 // to use a promotion manager in more than one thread, the stacks MUST be                                                  
41 // on cheap. This can lead to memory leaks, though, as they are not auto                                                   
42 // deallocated.                                                                                                            
43 //                                                                                                                         
44 // FIX ME FIX ME Add a destructor, and don't rely on the user to drain/flush/deallocate!                                   
45 //                                                                                                                         
46 
47 class MutableSpace;                                                                                                        
48 class PSOldGen;                                                                                                            
49 class ParCompactionManager;                                                                                                
50 
51 class PSPromotionManager {                                                                                                 
52   friend class PSScavenge;                                                                                                 
                                                                                                                           
53   friend class PSRefProcTaskExecutor;                                                                                      
54  private:                                                                                                                  
55   static PaddedEnd<PSPromotionManager>* _manager_array;                                                                    
56   static OopStarTaskQueueSet*           _stack_array_depth;                                                                
57   static PreservedMarksSet*             _preserved_marks_set;                                                              
58   static PSOldGen*                      _old_gen;                                                                          
59   static MutableSpace*                  _young_space;                                                                      
60 
61 #if TASKQUEUE_STATS                                                                                                        
62   size_t                              _masked_pushes;                                                                      
63   size_t                              _masked_steals;                                                                      
64   size_t                              _arrays_chunked;                                                                     
65   size_t                              _array_chunks_processed;                                                             
66 
67   void print_local_stats(outputStream* const out, uint i) const;                                                           
68   static void print_taskqueue_stats();                                                                                     
69 
70   void reset_stats();                                                                                                      
71 #endif // TASKQUEUE_STATS                                                                                                  

33 #include "utilities/globalDefinitions.hpp"
34 
35 //
36 // psPromotionManager is used by a single thread to manage object survival
37 // during a scavenge. The promotion manager contains thread local data only.
38 //
39 // NOTE! Be careful when allocating the stacks on cheap. If you are going
40 // to use a promotion manager in more than one thread, the stacks MUST be
41 // on cheap. This can lead to memory leaks, though, as they are not auto
42 // deallocated.
43 //
44 // FIX ME FIX ME Add a destructor, and don't rely on the user to drain/flush/deallocate!
45 //
46 
47 class MutableSpace;
48 class PSOldGen;
49 class ParCompactionManager;
50 
51 class PSPromotionManager {
52   friend class PSScavenge;
53   friend class ScavengeRootsTask;
54   friend class PSRefProcTaskExecutor;
55  private:
56   static PaddedEnd<PSPromotionManager>* _manager_array;
57   static OopStarTaskQueueSet*           _stack_array_depth;
58   static PreservedMarksSet*             _preserved_marks_set;
59   static PSOldGen*                      _old_gen;
60   static MutableSpace*                  _young_space;
61 
62 #if TASKQUEUE_STATS
63   size_t                              _masked_pushes;
64   size_t                              _masked_steals;
65   size_t                              _arrays_chunked;
66   size_t                              _array_chunks_processed;
67 
68   void print_local_stats(outputStream* const out, uint i) const;
69   static void print_taskqueue_stats();
70 
71   void reset_stats();
72 #endif // TASKQUEUE_STATS
< prev index next >