< prev index next >

src/share/vm/gc/shenandoah/shenandoahConcurrentMark.hpp

Print this page
rev 13055 : Implement barriers for maintaining connection matrix.

*** 82,129 **** // Actual mark loop with closures set up template <class T, bool CANCELLABLE, bool DRAIN_SATB, bool COUNT_LIVENESS> void mark_loop_work(T* cl, jushort* live_data, uint worker_id, ParallelTaskTerminator *t); ! template <bool CANCELLABLE, bool DRAIN_SATB, bool COUNT_LIVENESS, bool CLASS_UNLOAD, bool UPDATE_REFS> void mark_loop_prework(uint worker_id, ParallelTaskTerminator *terminator, ReferenceProcessor *rp); // ------------------------ Currying dynamic arguments to template args ---------------------------- template <bool B1, bool B2, bool B3, bool B4> ! void mark_loop_4(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b5) { if (b5) { ! mark_loop_prework<B1, B2, B3, B4, true>(w, t, rp); } else { ! mark_loop_prework<B1, B2, B3, B4, false>(w, t, rp); } }; template <bool B1, bool B2, bool B3> ! void mark_loop_3(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b4, bool b5) { if (b4) { ! mark_loop_4<B1, B2, B3, true>(w, t, rp, b5); } else { ! mark_loop_4<B1, B2, B3, false>(w, t, rp, b5); } }; template <bool B1, bool B2> ! void mark_loop_2(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b3, bool b4, bool b5) { if (b3) { ! mark_loop_3<B1, B2, true>(w, t, rp, b4, b5); } else { ! mark_loop_3<B1, B2, false>(w, t, rp, b4, b5); } }; template <bool B1> ! void mark_loop_1(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b2, bool b3, bool b4, bool b5) { if (b2) { ! mark_loop_2<B1, true>(w, t, rp, b3, b4, b5); } else { ! mark_loop_2<B1, false>(w, t, rp, b3, b4, b5); } }; // ------------------------ END: Currying dynamic arguments to template args ---------------------------- --- 82,138 ---- // Actual mark loop with closures set up template <class T, bool CANCELLABLE, bool DRAIN_SATB, bool COUNT_LIVENESS> void mark_loop_work(T* cl, jushort* live_data, uint worker_id, ParallelTaskTerminator *t); ! template <bool CANCELLABLE, bool DRAIN_SATB, bool COUNT_LIVENESS, bool CLASS_UNLOAD, bool UPDATE_REFS, bool UPDATE_MATRIX> void mark_loop_prework(uint worker_id, ParallelTaskTerminator *terminator, ReferenceProcessor *rp); // ------------------------ Currying dynamic arguments to template args ---------------------------- + template <bool B1, bool B2, bool B3, bool B4, bool B5> + void mark_loop_5(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b6) { + if (b6) { + mark_loop_prework<B1, B2, B3, B4, B5, true>(w, t, rp); + } else { + mark_loop_prework<B1, B2, B3, B4, B5, false>(w, t, rp); + } + }; + template <bool B1, bool B2, bool B3, bool B4> ! void mark_loop_4(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b5, bool b6) { if (b5) { ! mark_loop_5<B1, B2, B3, B4, true>(w, t, rp, b6); } else { ! mark_loop_5<B1, B2, B3, B4, false>(w, t, rp, b6); } }; template <bool B1, bool B2, bool B3> ! void mark_loop_3(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b4, bool b5, bool b6) { if (b4) { ! mark_loop_4<B1, B2, B3, true>(w, t, rp, b5, b6); } else { ! mark_loop_4<B1, B2, B3, false>(w, t, rp, b5, b6); } }; template <bool B1, bool B2> ! void mark_loop_2(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b3, bool b4, bool b5, bool b6) { if (b3) { ! mark_loop_3<B1, B2, true>(w, t, rp, b4, b5, b6); } else { ! mark_loop_3<B1, B2, false>(w, t, rp, b4, b5, b6); } }; template <bool B1> ! void mark_loop_1(uint w, ParallelTaskTerminator* t, ReferenceProcessor* rp, bool b2, bool b3, bool b4, bool b5, bool b6) { if (b2) { ! mark_loop_2<B1, true>(w, t, rp, b3, b4, b5, b6); } else { ! mark_loop_2<B1, false>(w, t, rp, b3, b4, b5, b6); } }; // ------------------------ END: Currying dynamic arguments to template args ----------------------------
*** 138,149 **** bool unload_classes() const; bool claim_codecache(); void clear_claim_codecache(); ! template<class T, UpdateRefsMode UPDATE_REFS> ! static inline void mark_through_ref(T* p, ShenandoahHeap* heap, SCMObjToScanQueue* q); void mark_from_roots(); // Prepares unmarked root objects by marking them and putting // them into the marking task queue. --- 147,158 ---- bool unload_classes() const; bool claim_codecache(); void clear_claim_codecache(); ! template<class T, UpdateRefsMode UPDATE_REFS, bool UPDATE_MATRIX> ! static inline void mark_through_ref(T* p, ShenandoahHeap* heap, SCMObjToScanQueue* q, ShenandoahConnectionMatrix* conn_matrix); void mark_from_roots(); // Prepares unmarked root objects by marking them and putting // them into the marking task queue.
*** 157,171 **** // Those are only needed public because they're called from closures. // Mark loop entry. // Translates dynamic arguments to template parameters with progressive currying. void mark_loop(uint worker_id, ParallelTaskTerminator* terminator, ReferenceProcessor *rp, ! bool cancellable, bool drain_satb, bool count_liveness, bool class_unload, bool update_refs) { if (cancellable) { ! mark_loop_1<true>(worker_id, terminator, rp, drain_satb, count_liveness, class_unload, update_refs); } else { ! mark_loop_1<false>(worker_id, terminator, rp, drain_satb, count_liveness, class_unload, update_refs); } } inline bool try_queue(SCMObjToScanQueue* q, SCMTask &task); --- 166,181 ---- // Those are only needed public because they're called from closures. // Mark loop entry. // Translates dynamic arguments to template parameters with progressive currying. void mark_loop(uint worker_id, ParallelTaskTerminator* terminator, ReferenceProcessor *rp, ! bool cancellable, bool drain_satb, bool count_liveness, bool class_unload, ! bool update_refs, bool update_matrix) { if (cancellable) { ! mark_loop_1<true>(worker_id, terminator, rp, drain_satb, count_liveness, class_unload, update_refs, update_matrix); } else { ! mark_loop_1<false>(worker_id, terminator, rp, drain_satb, count_liveness, class_unload, update_refs, update_matrix); } } inline bool try_queue(SCMObjToScanQueue* q, SCMTask &task);
< prev index next >