< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp

8201171: Cleanup in g1CollectedHeap, change CamelCase to snake_case
Reviewed-by:

102   // Assign the containing region to containing_hr so that we don't                                                        
103   // have to keep calling heap_region_containing() in the                                                                  
104   // asserts below.                                                                                                        
105   DEBUG_ONLY(HeapRegion* containing_hr = heap_region_containing(start);)                                                   
106   assert(word_size > 0, "pre-condition");                                                                                  
107   assert(containing_hr->is_in(start), "it should contain start");                                                          
108   assert(containing_hr->is_young(), "it should be young");                                                                 
109   assert(!containing_hr->is_humongous(), "it should not be humongous");                                                    
110 
111   HeapWord* end = start + word_size;                                                                                       
112   assert(containing_hr->is_in(end - 1), "it should also contain end - 1");                                                 
113 
114   MemRegion mr(start, end);                                                                                                
115   card_table()->g1_mark_as_young(mr);                                                                                      
116 }                                                                                                                          
117 
118 inline RefToScanQueue* G1CollectedHeap::task_queue(uint i) const {                                                         
119   return _task_queues->queue(i);                                                                                           
120 }                                                                                                                          
121 
122 inline bool G1CollectedHeap::isMarkedNext(oop obj) const {                                                                 
123   return _cm->next_mark_bitmap()->is_marked((HeapWord*)obj);                                                               
124 }                                                                                                                          
125 
126 inline bool G1CollectedHeap::is_in_cset(oop obj) {                                                                         
127   return is_in_cset((HeapWord*)obj);                                                                                       
128 }                                                                                                                          
129 
130 inline bool G1CollectedHeap::is_in_cset(HeapWord* addr) {                                                                  
131   return _in_cset_fast_test.is_in_cset(addr);                                                                              
132 }                                                                                                                          
133 
134 bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) {                                                                   
135   return _in_cset_fast_test.is_in_cset(hr);                                                                                
136 }                                                                                                                          
137 
138 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {                                                             
139   return _in_cset_fast_test.is_in_cset_or_humongous((HeapWord*)obj);                                                       
140 }                                                                                                                          
141 

102   // Assign the containing region to containing_hr so that we don't
103   // have to keep calling heap_region_containing() in the
104   // asserts below.
105   DEBUG_ONLY(HeapRegion* containing_hr = heap_region_containing(start);)
106   assert(word_size > 0, "pre-condition");
107   assert(containing_hr->is_in(start), "it should contain start");
108   assert(containing_hr->is_young(), "it should be young");
109   assert(!containing_hr->is_humongous(), "it should not be humongous");
110 
111   HeapWord* end = start + word_size;
112   assert(containing_hr->is_in(end - 1), "it should also contain end - 1");
113 
114   MemRegion mr(start, end);
115   card_table()->g1_mark_as_young(mr);
116 }
117 
118 inline RefToScanQueue* G1CollectedHeap::task_queue(uint i) const {
119   return _task_queues->queue(i);
120 }
121 
122 inline bool G1CollectedHeap::is_marked_next(oop obj) const {
123   return _cm->next_mark_bitmap()->is_marked((HeapWord*)obj);
124 }
125 
126 inline bool G1CollectedHeap::is_in_cset(oop obj) {
127   return is_in_cset((HeapWord*)obj);
128 }
129 
130 inline bool G1CollectedHeap::is_in_cset(HeapWord* addr) {
131   return _in_cset_fast_test.is_in_cset(addr);
132 }
133 
134 bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) {
135   return _in_cset_fast_test.is_in_cset(hr);
136 }
137 
138 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
139   return _in_cset_fast_test.is_in_cset_or_humongous((HeapWord*)obj);
140 }
141 

224     return false;                                                                                                          
225   }                                                                                                                        
226   return heap_region_containing(obj)->is_young();                                                                          
227 }                                                                                                                          
228 
229 inline bool G1CollectedHeap::is_obj_dead(const oop obj) const {                                                            
230   if (obj == NULL) {                                                                                                       
231     return false;                                                                                                          
232   }                                                                                                                        
233   return is_obj_dead(obj, heap_region_containing(obj));                                                                    
234 }                                                                                                                          
235 
236 inline bool G1CollectedHeap::is_obj_ill(const oop obj) const {                                                             
237   if (obj == NULL) {                                                                                                       
238     return false;                                                                                                          
239   }                                                                                                                        
240   return is_obj_ill(obj, heap_region_containing(obj));                                                                     
241 }                                                                                                                          
242 
243 inline bool G1CollectedHeap::is_obj_dead_full(const oop obj, const HeapRegion* hr) const {                                 
244    return !isMarkedNext(obj) && !hr->is_archive();                                                                         
245 }                                                                                                                          
246 
247 inline bool G1CollectedHeap::is_obj_dead_full(const oop obj) const {                                                       
248     return is_obj_dead_full(obj, heap_region_containing(obj));                                                             
249 }                                                                                                                          
250 
251 inline void G1CollectedHeap::set_humongous_reclaim_candidate(uint region, bool value) {                                    
252   assert(_hrm.at(region)->is_starts_humongous(), "Must start a humongous object");                                         
253   _humongous_reclaim_candidates.set_candidate(region, value);                                                              
254 }                                                                                                                          
255 
256 inline bool G1CollectedHeap::is_humongous_reclaim_candidate(uint region) {                                                 
257   assert(_hrm.at(region)->is_starts_humongous(), "Must start a humongous object");                                         
258   return _humongous_reclaim_candidates.is_candidate(region);                                                               
259 }                                                                                                                          
260 
261 inline void G1CollectedHeap::set_humongous_is_live(oop obj) {                                                              
262   uint region = addr_to_region((HeapWord*)obj);                                                                            
263   // Clear the flag in the humongous_reclaim_candidates table.  Also                                                       

224     return false;
225   }
226   return heap_region_containing(obj)->is_young();
227 }
228 
229 inline bool G1CollectedHeap::is_obj_dead(const oop obj) const {
230   if (obj == NULL) {
231     return false;
232   }
233   return is_obj_dead(obj, heap_region_containing(obj));
234 }
235 
236 inline bool G1CollectedHeap::is_obj_ill(const oop obj) const {
237   if (obj == NULL) {
238     return false;
239   }
240   return is_obj_ill(obj, heap_region_containing(obj));
241 }
242 
243 inline bool G1CollectedHeap::is_obj_dead_full(const oop obj, const HeapRegion* hr) const {
244    return !is_marked_next(obj) && !hr->is_archive();
245 }
246 
247 inline bool G1CollectedHeap::is_obj_dead_full(const oop obj) const {
248     return is_obj_dead_full(obj, heap_region_containing(obj));
249 }
250 
251 inline void G1CollectedHeap::set_humongous_reclaim_candidate(uint region, bool value) {
252   assert(_hrm.at(region)->is_starts_humongous(), "Must start a humongous object");
253   _humongous_reclaim_candidates.set_candidate(region, value);
254 }
255 
256 inline bool G1CollectedHeap::is_humongous_reclaim_candidate(uint region) {
257   assert(_hrm.at(region)->is_starts_humongous(), "Must start a humongous object");
258   return _humongous_reclaim_candidates.is_candidate(region);
259 }
260 
261 inline void G1CollectedHeap::set_humongous_is_live(oop obj) {
262   uint region = addr_to_region((HeapWord*)obj);
263   // Clear the flag in the humongous_reclaim_candidates table.  Also
< prev index next >