< prev index next >

src/hotspot/share/gc/shared/cardTableRS.cpp

Print this page

        

*** 32,81 **** #include "runtime/atomic.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" #include "utilities/macros.hpp" ! class HasAccumulatedModifiedOopsClosure : public KlassClosure { bool _found; public: HasAccumulatedModifiedOopsClosure() : _found(false) {} ! void do_klass(Klass* klass) { if (_found) { return; } ! if (klass->has_accumulated_modified_oops()) { _found = true; } } bool found() { return _found; } }; ! bool KlassRemSet::mod_union_is_clear() { HasAccumulatedModifiedOopsClosure closure; ! ClassLoaderDataGraph::classes_do(&closure); return !closure.found(); } ! class ClearKlassModUnionClosure : public KlassClosure { public: ! void do_klass(Klass* klass) { ! if (klass->has_accumulated_modified_oops()) { ! klass->clear_accumulated_modified_oops(); } } }; ! void KlassRemSet::clear_mod_union() { ! ClearKlassModUnionClosure closure; ! ClassLoaderDataGraph::classes_do(&closure); } CardTableRS::CardTableRS(MemRegion whole_heap) : _bs(NULL), _cur_youngergen_card_val(youngergenP1_card) { _ct_bs = new CardTableModRefBSForCTRS(whole_heap); --- 32,82 ---- #include "runtime/atomic.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" #include "utilities/macros.hpp" ! class HasAccumulatedModifiedOopsClosure : public CLDClosure { bool _found; public: HasAccumulatedModifiedOopsClosure() : _found(false) {} ! void do_cld(ClassLoaderData* cld) { if (_found) { return; } ! if (cld->has_accumulated_modified_oops()) { _found = true; } } bool found() { return _found; } }; ! bool CLDRemSet::mod_union_is_clear() { HasAccumulatedModifiedOopsClosure closure; ! ClassLoaderDataGraph::cld_do(&closure); return !closure.found(); } ! class ClearCLDModUnionClosure : public CLDClosure { public: ! void do_cld(ClassLoaderData* cld) { ! if (cld->has_accumulated_modified_oops()) { ! cld->clear_accumulated_modified_oops(); } } }; ! void CLDRemSet::clear_mod_union() { ! ClearCLDModUnionClosure closure; ! ClassLoaderDataGraph::cld_do(&closure); } + CardTableRS::CardTableRS(MemRegion whole_heap) : _bs(NULL), _cur_youngergen_card_val(youngergenP1_card) { _ct_bs = new CardTableModRefBSForCTRS(whole_heap);
< prev index next >