49 // The index of the next candidate old region to be considered for |
49 // The index of the next candidate old region to be considered for |
50 // addition to the CSet. |
50 // addition to the CSet. |
51 uint _curr_index; |
51 uint _curr_index; |
52 |
52 |
53 // The number of candidate old regions added to the CSet chooser. |
53 // The number of candidate old regions added to the CSet chooser. |
|
54 // Note: this is not updated when removing a region using |
|
55 // remove_and_move_to_next() below. |
54 uint _length; |
56 uint _length; |
55 |
57 |
56 // Keeps track of the start of the next array chunk to be claimed by |
58 // Keeps track of the start of the next array chunk to be claimed by |
57 // parallel GC workers. |
59 // parallel GC workers. |
58 uint _first_par_unreserved_idx; |
60 uint _first_par_unreserved_idx; |
109 assert(!hr->is_young(), "should never consider young regions"); |
111 assert(!hr->is_young(), "should never consider young regions"); |
110 return !hr->isHumongous() && |
112 return !hr->isHumongous() && |
111 hr->live_bytes() < _region_live_threshold_bytes; |
113 hr->live_bytes() < _region_live_threshold_bytes; |
112 } |
114 } |
113 |
115 |
114 // Calculate the minimum number of old regions we'll add to the CSet |
116 // Returns the number candidate old regions added |
115 // during a mixed GC. |
117 uint length() { return _length; } |
116 uint calc_min_old_cset_length(); |
|
117 |
|
118 // Calculate the maximum number of old regions we'll add to the CSet |
|
119 // during a mixed GC. |
|
120 uint calc_max_old_cset_length(); |
|
121 |
118 |
122 // Serial version. |
119 // Serial version. |
123 void add_region(HeapRegion *hr); |
120 void add_region(HeapRegion *hr); |
124 |
121 |
125 // Must be called before calls to claim_array_chunk(). |
122 // Must be called before calls to claim_array_chunk(). |