< prev index next >

src/hotspot/share/gc/g1/g1RootProcessor.cpp

Print this page




  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 
  27 #include "aot/aotLoader.hpp"
  28 #include "classfile/stringTable.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "code/codeCache.hpp"
  31 #include "gc/g1/bufferingOopClosure.hpp"
  32 #include "gc/g1/g1BarrierSet.hpp"
  33 #include "gc/g1/g1CodeBlobClosure.hpp"
  34 #include "gc/g1/g1CollectedHeap.inline.hpp"
  35 #include "gc/g1/g1CollectorState.hpp"
  36 #include "gc/g1/g1GCPhaseTimes.hpp"
  37 #include "gc/g1/g1Policy.hpp"
  38 #include "gc/g1/g1RootClosures.hpp"
  39 #include "gc/g1/g1RootProcessor.hpp"
  40 #include "gc/g1/heapRegion.inline.hpp"

  41 #include "gc/shared/weakProcessor.hpp"
  42 #include "memory/allocation.inline.hpp"
  43 #include "runtime/mutex.hpp"
  44 #include "services/management.hpp"
  45 #include "utilities/macros.hpp"
  46 
  47 void G1RootProcessor::worker_has_discovered_all_strong_classes() {
  48   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
  49 
  50   uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
  51   if (new_value == n_workers()) {
  52     // This thread is last. Notify the others.
  53     MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
  54     _lock.notify_all();
  55   }
  56 }
  57 
  58 void G1RootProcessor::wait_until_all_strong_classes_discovered() {
  59   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
  60 




  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 
  27 #include "aot/aotLoader.hpp"
  28 #include "classfile/stringTable.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "code/codeCache.hpp"
  31 #include "gc/g1/bufferingOopClosure.hpp"
  32 #include "gc/g1/g1BarrierSet.hpp"
  33 #include "gc/g1/g1CodeBlobClosure.hpp"
  34 #include "gc/g1/g1CollectedHeap.inline.hpp"
  35 #include "gc/g1/g1CollectorState.hpp"
  36 #include "gc/g1/g1GCPhaseTimes.hpp"
  37 #include "gc/g1/g1Policy.hpp"
  38 #include "gc/g1/g1RootClosures.hpp"
  39 #include "gc/g1/g1RootProcessor.hpp"
  40 #include "gc/g1/heapRegion.inline.hpp"
  41 #include "gc/shared/referenceProcessor.hpp"
  42 #include "gc/shared/weakProcessor.hpp"
  43 #include "memory/allocation.inline.hpp"
  44 #include "runtime/mutex.hpp"
  45 #include "services/management.hpp"
  46 #include "utilities/macros.hpp"
  47 
  48 void G1RootProcessor::worker_has_discovered_all_strong_classes() {
  49   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
  50 
  51   uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
  52   if (new_value == n_workers()) {
  53     // This thread is last. Notify the others.
  54     MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
  55     _lock.notify_all();
  56   }
  57 }
  58 
  59 void G1RootProcessor::wait_until_all_strong_classes_discovered() {
  60   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
  61 


< prev index next >