< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.cpp

Print this page
rev 53870 : imported patch shade-shenandoah-ptrqueue


 110     for (size_t i = 0; i < size; ++i) {
 111       oop* p = (oop*) &buffer[i];
 112       oop obj = RawAccess<>::oop_load(p);
 113       shenandoah_assert_not_forwarded(p, obj);
 114       if (_heap->marking_context()->mark(obj)) {
 115         _queue->push(ShenandoahMarkTask(obj));
 116       }
 117     }
 118   }
 119 };
 120 
 121 class ShenandoahTraversalSATBThreadsClosure : public ThreadClosure {
 122 private:
 123   ShenandoahTraversalSATBBufferClosure* _satb_cl;
 124 
 125 public:
 126   ShenandoahTraversalSATBThreadsClosure(ShenandoahTraversalSATBBufferClosure* satb_cl) :
 127     _satb_cl(satb_cl) {}
 128 
 129   void do_thread(Thread* thread) {
 130     if (thread->is_Java_thread()) {
 131       JavaThread* jt = (JavaThread*)thread;
 132       ShenandoahThreadLocalData::satb_mark_queue(jt).apply_closure_and_empty(_satb_cl);
 133     } else if (thread->is_VM_thread()) {
 134       ShenandoahBarrierSet::satb_mark_queue_set().shared_satb_queue()->apply_closure_and_empty(_satb_cl);
 135     }
 136   }
 137 };
 138 
 139 // Like CLDToOopClosure, but clears has_modified_oops, so that we can record modified CLDs during traversal
 140 // and remark them later during final-traversal.
 141 class ShenandoahMarkCLDClosure : public CLDClosure {
 142 private:
 143   OopClosure* _cl;
 144 public:
 145   ShenandoahMarkCLDClosure(OopClosure* cl) : _cl(cl) {}
 146   void do_cld(ClassLoaderData* cld) {
 147     cld->oops_do(_cl, true, true);
 148   }
 149 };
 150 
 151 // Like CLDToOopClosure, but only process modified CLDs
 152 class ShenandoahRemarkCLDClosure : public CLDClosure {
 153 private:
 154   OopClosure* _cl;
 155 public:




 110     for (size_t i = 0; i < size; ++i) {
 111       oop* p = (oop*) &buffer[i];
 112       oop obj = RawAccess<>::oop_load(p);
 113       shenandoah_assert_not_forwarded(p, obj);
 114       if (_heap->marking_context()->mark(obj)) {
 115         _queue->push(ShenandoahMarkTask(obj));
 116       }
 117     }
 118   }
 119 };
 120 
 121 class ShenandoahTraversalSATBThreadsClosure : public ThreadClosure {
 122 private:
 123   ShenandoahTraversalSATBBufferClosure* _satb_cl;
 124 
 125 public:
 126   ShenandoahTraversalSATBThreadsClosure(ShenandoahTraversalSATBBufferClosure* satb_cl) :
 127     _satb_cl(satb_cl) {}
 128 
 129   void do_thread(Thread* thread) {
 130     ShenandoahThreadLocalData::satb_mark_queue(thread).apply_closure_and_empty(_satb_cl);





 131   }
 132 };
 133 
 134 // Like CLDToOopClosure, but clears has_modified_oops, so that we can record modified CLDs during traversal
 135 // and remark them later during final-traversal.
 136 class ShenandoahMarkCLDClosure : public CLDClosure {
 137 private:
 138   OopClosure* _cl;
 139 public:
 140   ShenandoahMarkCLDClosure(OopClosure* cl) : _cl(cl) {}
 141   void do_cld(ClassLoaderData* cld) {
 142     cld->oops_do(_cl, true, true);
 143   }
 144 };
 145 
 146 // Like CLDToOopClosure, but only process modified CLDs
 147 class ShenandoahRemarkCLDClosure : public CLDClosure {
 148 private:
 149   OopClosure* _cl;
 150 public:


< prev index next >