< prev index next >

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

8221260: Initialize more class members on construction, remove some unused ones
Reviewed-by:

34 class ObjectStartArray;                                                                                                    
35 
36 class PSMarkSweepDecorator: public CHeapObj<mtGC> {                                                                        
37  private:                                                                                                                  
38   static PSMarkSweepDecorator* _destination_decorator;                                                                     
39 
40  protected:                                                                                                                
41   MutableSpace* _space;                                                                                                    
42   ObjectStartArray* _start_array;                                                                                          
43   HeapWord* _first_dead;                                                                                                   
44   HeapWord* _end_of_live;                                                                                                  
45   HeapWord* _compaction_top;                                                                                               
46   size_t _allowed_dead_ratio;                                                                                              
47 
48   bool insert_deadspace(size_t& allowed_deadspace_words, HeapWord* q,                                                      
49                         size_t word_len);                                                                                  
50 
51  public:                                                                                                                   
52   PSMarkSweepDecorator(MutableSpace* space, ObjectStartArray* start_array,                                                 
53                        size_t allowed_dead_ratio) :                                                                        
54     _space(space), _start_array(start_array),                                                                              
55     _allowed_dead_ratio(allowed_dead_ratio) { }                                                                            
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
56 
57   // During a compacting collection, we need to collapse objects into                                                      
58   // spaces in a given order. We want to fill space A, space B, and so                                                     
59   // on. The code that controls that order is in the following methods.                                                    
60   static void set_destination_decorator_tenured();                                                                         
61   static void advance_destination_decorator();                                                                             
62   static PSMarkSweepDecorator* destination_decorator();                                                                    
63 
64   // Accessors                                                                                                             
65   MutableSpace* space()                     { return _space; }                                                             
66   ObjectStartArray* start_array()           { return _start_array; }                                                       
67 
68   HeapWord* compaction_top()                { return _compaction_top; }                                                    
69   void set_compaction_top(HeapWord* value)  { _compaction_top = value; }                                                   
70 
71   size_t allowed_dead_ratio()               { return _allowed_dead_ratio; }                                                
72   void set_allowed_dead_ratio(size_t value) { _allowed_dead_ratio = value; }                                               
73 
74   // Work methods                                                                                                          

34 class ObjectStartArray;
35 
36 class PSMarkSweepDecorator: public CHeapObj<mtGC> {
37  private:
38   static PSMarkSweepDecorator* _destination_decorator;
39 
40  protected:
41   MutableSpace* _space;
42   ObjectStartArray* _start_array;
43   HeapWord* _first_dead;
44   HeapWord* _end_of_live;
45   HeapWord* _compaction_top;
46   size_t _allowed_dead_ratio;
47 
48   bool insert_deadspace(size_t& allowed_deadspace_words, HeapWord* q,
49                         size_t word_len);
50 
51  public:
52   PSMarkSweepDecorator(MutableSpace* space, ObjectStartArray* start_array,
53                        size_t allowed_dead_ratio) :
54     _space(space),
55     _start_array(start_array),
56     _first_dead(NULL),
57     _end_of_live(NULL),
58     _compaction_top(NULL),
59     _allowed_dead_ratio(allowed_dead_ratio){ }
60 
61   // During a compacting collection, we need to collapse objects into
62   // spaces in a given order. We want to fill space A, space B, and so
63   // on. The code that controls that order is in the following methods.
64   static void set_destination_decorator_tenured();
65   static void advance_destination_decorator();
66   static PSMarkSweepDecorator* destination_decorator();
67 
68   // Accessors
69   MutableSpace* space()                     { return _space; }
70   ObjectStartArray* start_array()           { return _start_array; }
71 
72   HeapWord* compaction_top()                { return _compaction_top; }
73   void set_compaction_top(HeapWord* value)  { _compaction_top = value; }
74 
75   size_t allowed_dead_ratio()               { return _allowed_dead_ratio; }
76   void set_allowed_dead_ratio(size_t value) { _allowed_dead_ratio = value; }
77 
78   // Work methods
< prev index next >