< prev index next >

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

Print this page

        

*** 39,49 **** #include "gc/z/zStat.hpp" #include "gc/z/zThreadLocalData.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "prims/jvmtiExport.hpp" - #include "prims/resolvedMethodTable.hpp" #include "runtime/atomic.hpp" #include "runtime/jniHandles.hpp" #include "runtime/thread.hpp" #include "runtime/safepoint.hpp" #include "runtime/synchronizer.hpp" --- 39,48 ----
*** 79,89 **** static const ZStatSubPhase ZSubPhaseConcurrentWeakRoots("Concurrent Weak Roots"); static const ZStatSubPhase ZSubPhaseConcurrentWeakRootsVMWeakHandles("Concurrent Weak Roots VMWeakHandles"); static const ZStatSubPhase ZSubPhaseConcurrentWeakRootsJNIWeakHandles("Concurrent Weak Roots JNIWeakHandles"); static const ZStatSubPhase ZSubPhaseConcurrentWeakRootsStringTable("Concurrent Weak Roots StringTable"); - static const ZStatSubPhase ZSubPhaseConcurrentWeakRootsResolvedMethodTable("Concurrent Weak Roots ResolvedMethodTable"); template <typename T, void (T::*F)(ZRootsIteratorClosure*)> ZSerialOopsDo<T, F>::ZSerialOopsDo(T* iter) : _iter(iter), _claimed(false) {} --- 78,87 ----
*** 341,362 **** ZConcurrentWeakRootsIterator::ZConcurrentWeakRootsIterator() : _vm_weak_handles_iter(SystemDictionary::vm_weak_oop_storage()), _jni_weak_handles_iter(JNIHandles::weak_global_handles()), _string_table_iter(StringTable::weak_storage()), - _resolved_method_table_iter(ResolvedMethodTable::weak_storage()), _vm_weak_handles(this), _jni_weak_handles(this), ! _string_table(this), ! _resolved_method_table(this) { StringTable::reset_dead_counter(); - ResolvedMethodTable::reset_dead_counter(); } ZConcurrentWeakRootsIterator::~ZConcurrentWeakRootsIterator() { StringTable::finish_dead_counter(); - ResolvedMethodTable::finish_dead_counter(); } void ZConcurrentWeakRootsIterator::do_vm_weak_handles(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRootsVMWeakHandles); _vm_weak_handles_iter.oops_do(cl); --- 339,356 ---- ZConcurrentWeakRootsIterator::ZConcurrentWeakRootsIterator() : _vm_weak_handles_iter(SystemDictionary::vm_weak_oop_storage()), _jni_weak_handles_iter(JNIHandles::weak_global_handles()), _string_table_iter(StringTable::weak_storage()), _vm_weak_handles(this), _jni_weak_handles(this), ! _string_table(this) { StringTable::reset_dead_counter(); } ZConcurrentWeakRootsIterator::~ZConcurrentWeakRootsIterator() { StringTable::finish_dead_counter(); } void ZConcurrentWeakRootsIterator::do_vm_weak_handles(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRootsVMWeakHandles); _vm_weak_handles_iter.oops_do(cl);
*** 365,387 **** void ZConcurrentWeakRootsIterator::do_jni_weak_handles(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRootsJNIWeakHandles); _jni_weak_handles_iter.oops_do(cl); } ! template <class Container> ! class ZDeadCounterClosure : public ZRootsIteratorClosure { private: ZRootsIteratorClosure* const _cl; size_t _ndead; public: ! ZDeadCounterClosure(ZRootsIteratorClosure* cl) : _cl(cl), _ndead(0) {} ! ~ZDeadCounterClosure() { ! Container::inc_dead_counter(_ndead); } virtual void do_oop(oop* p) { _cl->do_oop(p); if (*p == NULL) { --- 359,380 ---- void ZConcurrentWeakRootsIterator::do_jni_weak_handles(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRootsJNIWeakHandles); _jni_weak_handles_iter.oops_do(cl); } ! class ZStringTableDeadCounterClosure : public ZRootsIteratorClosure { private: ZRootsIteratorClosure* const _cl; size_t _ndead; public: ! ZStringTableDeadCounterClosure(ZRootsIteratorClosure* cl) : _cl(cl), _ndead(0) {} ! ~ZStringTableDeadCounterClosure() { ! StringTable::inc_dead_counter(_ndead); } virtual void do_oop(oop* p) { _cl->do_oop(p); if (*p == NULL) {
*** 394,419 **** } }; void ZConcurrentWeakRootsIterator::do_string_table(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRootsStringTable); ! ZDeadCounterClosure<StringTable> counter_cl(cl); _string_table_iter.oops_do(&counter_cl); } - void ZConcurrentWeakRootsIterator::do_resolved_method_table(ZRootsIteratorClosure* cl) { - ZStatTimer timer(ZSubPhaseConcurrentWeakRootsResolvedMethodTable); - ZDeadCounterClosure<ResolvedMethodTable> counter_cl(cl); - _resolved_method_table_iter.oops_do(&counter_cl); - } - void ZConcurrentWeakRootsIterator::oops_do(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRoots); _vm_weak_handles.oops_do(cl); _jni_weak_handles.oops_do(cl); _string_table.oops_do(cl); - _resolved_method_table.oops_do(cl); } ZThreadRootsIterator::ZThreadRootsIterator() : _threads(this) { assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint"); --- 387,405 ---- } }; void ZConcurrentWeakRootsIterator::do_string_table(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRootsStringTable); ! ZStringTableDeadCounterClosure counter_cl(cl); _string_table_iter.oops_do(&counter_cl); } void ZConcurrentWeakRootsIterator::oops_do(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentWeakRoots); _vm_weak_handles.oops_do(cl); _jni_weak_handles.oops_do(cl); _string_table.oops_do(cl); } ZThreadRootsIterator::ZThreadRootsIterator() : _threads(this) { assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
< prev index next >