< prev index next >

src/share/vm/gc/cms/cmsOopClosures.inline.hpp

Print this page




  57   }
  58 
  59 #define DO_OOP_WORK_NV_IMPL(cls)                              \
  60   DO_OOP_WORK_IMPL(cls)                                       \
  61   void cls::do_oop_nv(oop* p)       { cls::do_oop_work(p); }  \
  62   void cls::do_oop_nv(narrowOop* p) { cls::do_oop_work(p); }
  63 
  64 DO_OOP_WORK_IMPL(MarkRefsIntoClosure)
  65 DO_OOP_WORK_IMPL(ParMarkRefsIntoClosure)
  66 DO_OOP_WORK_IMPL(MarkRefsIntoVerifyClosure)
  67 DO_OOP_WORK_NV_IMPL(PushAndMarkClosure)
  68 DO_OOP_WORK_NV_IMPL(ParPushAndMarkClosure)
  69 DO_OOP_WORK_NV_IMPL(MarkRefsIntoAndScanClosure)
  70 DO_OOP_WORK_NV_IMPL(ParMarkRefsIntoAndScanClosure)
  71 
  72 // Trim our work_queue so its length is below max at return
  73 inline void ParMarkRefsIntoAndScanClosure::trim_queue(uint max) {
  74   while (_work_queue->size() > max) {
  75     oop newOop;
  76     if (_work_queue->pop_local(newOop)) {
  77       assert(newOop->is_oop(), "Expected an oop");
  78       assert(_bit_map->isMarked((HeapWord*)newOop),
  79              "only grey objects on this stack");
  80       // iterate over the oops in this oop, marking and pushing
  81       // the ones in CMS heap (i.e. in _span).
  82       newOop->oop_iterate(&_parPushAndMarkClosure);
  83     }
  84   }
  85 }
  86 
  87 DO_OOP_WORK_NV_IMPL(PushOrMarkClosure)
  88 DO_OOP_WORK_NV_IMPL(ParPushOrMarkClosure)
  89 DO_OOP_WORK_NV_IMPL(CMSKeepAliveClosure)
  90 DO_OOP_WORK_NV_IMPL(CMSInnerParMarkAndPushClosure)
  91 DO_OOP_WORK_IMPL(CMSParKeepAliveClosure)
  92 
  93 #endif // SHARE_VM_GC_CMS_CMSOOPCLOSURES_INLINE_HPP


  57   }
  58 
  59 #define DO_OOP_WORK_NV_IMPL(cls)                              \
  60   DO_OOP_WORK_IMPL(cls)                                       \
  61   void cls::do_oop_nv(oop* p)       { cls::do_oop_work(p); }  \
  62   void cls::do_oop_nv(narrowOop* p) { cls::do_oop_work(p); }
  63 
  64 DO_OOP_WORK_IMPL(MarkRefsIntoClosure)
  65 DO_OOP_WORK_IMPL(ParMarkRefsIntoClosure)
  66 DO_OOP_WORK_IMPL(MarkRefsIntoVerifyClosure)
  67 DO_OOP_WORK_NV_IMPL(PushAndMarkClosure)
  68 DO_OOP_WORK_NV_IMPL(ParPushAndMarkClosure)
  69 DO_OOP_WORK_NV_IMPL(MarkRefsIntoAndScanClosure)
  70 DO_OOP_WORK_NV_IMPL(ParMarkRefsIntoAndScanClosure)
  71 
  72 // Trim our work_queue so its length is below max at return
  73 inline void ParMarkRefsIntoAndScanClosure::trim_queue(uint max) {
  74   while (_work_queue->size() > max) {
  75     oop newOop;
  76     if (_work_queue->pop_local(newOop)) {
  77       assert(oopDesc::is_oop(newOop), "Expected an oop");
  78       assert(_bit_map->isMarked((HeapWord*)newOop),
  79              "only grey objects on this stack");
  80       // iterate over the oops in this oop, marking and pushing
  81       // the ones in CMS heap (i.e. in _span).
  82       newOop->oop_iterate(&_parPushAndMarkClosure);
  83     }
  84   }
  85 }
  86 
  87 DO_OOP_WORK_NV_IMPL(PushOrMarkClosure)
  88 DO_OOP_WORK_NV_IMPL(ParPushOrMarkClosure)
  89 DO_OOP_WORK_NV_IMPL(CMSKeepAliveClosure)
  90 DO_OOP_WORK_NV_IMPL(CMSInnerParMarkAndPushClosure)
  91 DO_OOP_WORK_IMPL(CMSParKeepAliveClosure)
  92 
  93 #endif // SHARE_VM_GC_CMS_CMSOOPCLOSURES_INLINE_HPP
< prev index next >