< prev index next >

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

Print this page

        

*** 29,65 **** #include "gc/shared/weakProcessor.inline.hpp" #include "gc/shared/weakProcessorPhases.hpp" #include "gc/shared/weakProcessorPhaseTimes.hpp" #include "memory/allocation.inline.hpp" #include "memory/iterator.hpp" - #include "prims/resolvedMethodTable.hpp" #include "runtime/globals.hpp" #include "utilities/macros.hpp" - template <typename Container> - class OopsDoAndReportCounts { - public: - void operator()(BoolObjectClosure* is_alive, OopClosure* keep_alive, WeakProcessorPhase phase) { - Container::reset_dead_counter(); - - CountingSkippedIsAliveClosure<BoolObjectClosure, OopClosure> cl(is_alive, keep_alive); - WeakProcessorPhases::oop_storage(phase)->oops_do(&cl); - - Container::inc_dead_counter(cl.num_dead() + cl.num_skipped()); - Container::finish_dead_counter(); - } - }; - void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) { FOR_EACH_WEAK_PROCESSOR_PHASE(phase) { if (WeakProcessorPhases::is_serial(phase)) { WeakProcessorPhases::processor(phase)(is_alive, keep_alive); } else { if (WeakProcessorPhases::is_stringtable(phase)) { ! OopsDoAndReportCounts<StringTable>()(is_alive, keep_alive, phase); ! } else if (WeakProcessorPhases::is_resolved_method_table(phase)){ ! OopsDoAndReportCounts<ResolvedMethodTable>()(is_alive, keep_alive, phase); } else { WeakProcessorPhases::oop_storage(phase)->weak_oops_do(is_alive, keep_alive); } } } --- 29,54 ---- #include "gc/shared/weakProcessor.inline.hpp" #include "gc/shared/weakProcessorPhases.hpp" #include "gc/shared/weakProcessorPhaseTimes.hpp" #include "memory/allocation.inline.hpp" #include "memory/iterator.hpp" #include "runtime/globals.hpp" #include "utilities/macros.hpp" void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) { FOR_EACH_WEAK_PROCESSOR_PHASE(phase) { if (WeakProcessorPhases::is_serial(phase)) { WeakProcessorPhases::processor(phase)(is_alive, keep_alive); } else { if (WeakProcessorPhases::is_stringtable(phase)) { ! StringTable::reset_dead_counter(); ! ! CountingSkippedIsAliveClosure<BoolObjectClosure, OopClosure> cl(is_alive, keep_alive); ! WeakProcessorPhases::oop_storage(phase)->oops_do(&cl); ! ! StringTable::inc_dead_counter(cl.num_dead() + cl.num_skipped()); ! StringTable::finish_dead_counter(); } else { WeakProcessorPhases::oop_storage(phase)->weak_oops_do(is_alive, keep_alive); } } }
*** 113,123 **** FOR_EACH_WEAK_PROCESSOR_OOP_STORAGE_PHASE(phase) { OopStorage* storage = WeakProcessorPhases::oop_storage(phase); new (states++) StorageState(storage, _nworkers); } StringTable::reset_dead_counter(); - ResolvedMethodTable::reset_dead_counter(); } WeakProcessor::Task::Task(uint nworkers) : _phase_times(NULL), _nworkers(nworkers), --- 102,111 ----
*** 144,154 **** ++states; } FREE_C_HEAP_ARRAY(StorageState, _storage_states); } StringTable::finish_dead_counter(); - ResolvedMethodTable::finish_dead_counter(); } void WeakProcessor::GangTask::work(uint worker_id) { _erased_do_work(this, worker_id); } --- 132,141 ----
< prev index next >