hotspot/src/share/vm/runtime/safepoint.cpp
changeset 24094 5dbf1f44de18
parent 23517 27c4307d6cda
child 24096 6f7e28b293fb
equal deleted inserted replaced
24093:095cc0a63ed9 24094:5dbf1f44de18
    73 # include "nativeInst_ppc.hpp"
    73 # include "nativeInst_ppc.hpp"
    74 # include "vmreg_ppc.inline.hpp"
    74 # include "vmreg_ppc.inline.hpp"
    75 #endif
    75 #endif
    76 #if INCLUDE_ALL_GCS
    76 #if INCLUDE_ALL_GCS
    77 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
    77 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
    78 #include "gc_implementation/shared/concurrentGCThread.hpp"
    78 #include "gc_implementation/shared/suspendibleThreadSet.hpp"
    79 #endif // INCLUDE_ALL_GCS
    79 #endif // INCLUDE_ALL_GCS
    80 #ifdef COMPILER1
    80 #ifdef COMPILER1
    81 #include "c1/c1_globals.hpp"
    81 #include "c1/c1_globals.hpp"
    82 #endif
    82 #endif
    83 
    83 
   108   if (UseConcMarkSweepGC) {
   108   if (UseConcMarkSweepGC) {
   109     // In the future we should investigate whether CMS can use the
   109     // In the future we should investigate whether CMS can use the
   110     // more-general mechanism below.  DLD (01/05).
   110     // more-general mechanism below.  DLD (01/05).
   111     ConcurrentMarkSweepThread::synchronize(false);
   111     ConcurrentMarkSweepThread::synchronize(false);
   112   } else if (UseG1GC) {
   112   } else if (UseG1GC) {
   113     ConcurrentGCThread::safepoint_synchronize();
   113     SuspendibleThreadSet::synchronize();
   114   }
   114   }
   115 #endif // INCLUDE_ALL_GCS
   115 #endif // INCLUDE_ALL_GCS
   116 
   116 
   117   // By getting the Threads_lock, we assure that no threads are about to start or
   117   // By getting the Threads_lock, we assure that no threads are about to start or
   118   // exit. It is released again in SafepointSynchronize::end().
   118   // exit. It is released again in SafepointSynchronize::end().
   484 #if INCLUDE_ALL_GCS
   484 #if INCLUDE_ALL_GCS
   485   // If there are any concurrent GC threads resume them.
   485   // If there are any concurrent GC threads resume them.
   486   if (UseConcMarkSweepGC) {
   486   if (UseConcMarkSweepGC) {
   487     ConcurrentMarkSweepThread::desynchronize(false);
   487     ConcurrentMarkSweepThread::desynchronize(false);
   488   } else if (UseG1GC) {
   488   } else if (UseG1GC) {
   489     ConcurrentGCThread::safepoint_desynchronize();
   489     SuspendibleThreadSet::desynchronize();
   490   }
   490   }
   491 #endif // INCLUDE_ALL_GCS
   491 #endif // INCLUDE_ALL_GCS
   492   // record this time so VMThread can keep track how much time has elapsed
   492   // record this time so VMThread can keep track how much time has elapsed
   493   // since last safepoint.
   493   // since last safepoint.
   494   _end_of_last_safepoint = os::javaTimeMillis();
   494   _end_of_last_safepoint = os::javaTimeMillis();