< prev index next >

src/hotspot/share/gc/z/zHeap.cpp

concurrent root iterator v2

concurrent root iterator

278   // Flip address view                                                                                                               
279   ZAddressMasks::flip_to_marked();                                                                                                   
280   flip_views();                                                                                                                      
281 
282   // Reset allocated/reclaimed/used statistics                                                                                       
283   _page_allocator.reset_statistics();                                                                                                
284 
285   // Reset encountered/dropped/enqueued statistics                                                                                   
286   _reference_processor.reset_statistics();                                                                                           
287 
288   // Enter mark phase                                                                                                                
289   ZGlobalPhase = ZPhaseMark;                                                                                                         
290 
291   // Reset marking information and mark roots                                                                                        
292   _mark.start();                                                                                                                     
293 
294   // Update statistics                                                                                                               
295   ZStatHeap::set_at_mark_start(capacity(), used());                                                                                  
296 }                                                                                                                                    
297 
298 void ZHeap::mark() {                                                                                                                 
299   _mark.mark();                                                                                                                      
300 }                                                                                                                                    
301 
302 void ZHeap::mark_flush_and_free(Thread* thread) {                                                                                    
303   _mark.flush_and_free(thread);                                                                                                      
304 }                                                                                                                                    
305 
306 class ZFixupPartialLoadsTask : public ZTask {                                                                                        
307 private:                                                                                                                             
308   ZThreadRootsIterator _thread_roots;                                                                                                
309 
310 public:                                                                                                                              
311   ZFixupPartialLoadsTask() :                                                                                                         
312       ZTask("ZFixupPartialLoadsTask"),                                                                                               
313       _thread_roots() {}                                                                                                             
314 
315   virtual void work() {                                                                                                              
316     ZMarkRootOopClosure cl;                                                                                                          
317     _thread_roots.oops_do(&cl);                                                                                                      
318   }                                                                                                                                  

278   // Flip address view
279   ZAddressMasks::flip_to_marked();
280   flip_views();
281 
282   // Reset allocated/reclaimed/used statistics
283   _page_allocator.reset_statistics();
284 
285   // Reset encountered/dropped/enqueued statistics
286   _reference_processor.reset_statistics();
287 
288   // Enter mark phase
289   ZGlobalPhase = ZPhaseMark;
290 
291   // Reset marking information and mark roots
292   _mark.start();
293 
294   // Update statistics
295   ZStatHeap::set_at_mark_start(capacity(), used());
296 }
297 
298 void ZHeap::mark(bool initial) {
299   _mark.mark(initial);
300 }
301 
302 void ZHeap::mark_flush_and_free(Thread* thread) {
303   _mark.flush_and_free(thread);
304 }
305 
306 class ZFixupPartialLoadsTask : public ZTask {
307 private:
308   ZThreadRootsIterator _thread_roots;
309 
310 public:
311   ZFixupPartialLoadsTask() :
312       ZTask("ZFixupPartialLoadsTask"),
313       _thread_roots() {}
314 
315   virtual void work() {
316     ZMarkRootOopClosure cl;
317     _thread_roots.oops_do(&cl);
318   }
< prev index next >