< prev index next >

src/share/vm/runtime/safepoint.cpp

Print this page
rev 12854 : [mq]: gcinterface.patch

*** 58,71 **** #include "services/runtimeService.hpp" #include "trace/tracing.hpp" #include "trace/traceMacros.hpp" #include "utilities/events.hpp" #include "utilities/macros.hpp" - #if INCLUDE_ALL_GCS - #include "gc/cms/concurrentMarkSweepThread.hpp" - #include "gc/g1/suspendibleThreadSet.hpp" - #endif // INCLUDE_ALL_GCS #ifdef COMPILER1 #include "c1/c1_globals.hpp" #endif // -------------------------------------------------------------------------------------------------- --- 58,67 ----
*** 89,107 **** if (PrintSafepointStatistics || PrintSafepointStatisticsTimeout > 0) { _safepoint_begin_time = os::javaTimeNanos(); _ts_of_current_safepoint = tty->time_stamp().seconds(); } ! #if INCLUDE_ALL_GCS ! if (UseConcMarkSweepGC) { ! // In the future we should investigate whether CMS can use the ! // more-general mechanism below. DLD (01/05). ! ConcurrentMarkSweepThread::synchronize(false); ! } else if (UseG1GC) { ! SuspendibleThreadSet::synchronize(); ! } ! #endif // INCLUDE_ALL_GCS // By getting the Threads_lock, we assure that no threads are about to start or // exit. It is released again in SafepointSynchronize::end(). Threads_lock->lock(); --- 85,95 ---- if (PrintSafepointStatistics || PrintSafepointStatisticsTimeout > 0) { _safepoint_begin_time = os::javaTimeNanos(); _ts_of_current_safepoint = tty->time_stamp().seconds(); } ! GC::gc()->synchronize_safepoint(); // By getting the Threads_lock, we assure that no threads are about to start or // exit. It is released again in SafepointSynchronize::end(). Threads_lock->lock();
*** 506,523 **** // Release threads lock, so threads can be created/destroyed again. It will also starts all threads // blocked in signal_thread_blocked Threads_lock->unlock(); } ! #if INCLUDE_ALL_GCS ! // If there are any concurrent GC threads resume them. ! if (UseConcMarkSweepGC) { ! ConcurrentMarkSweepThread::desynchronize(false); ! } else if (UseG1GC) { ! SuspendibleThreadSet::desynchronize(); ! } ! #endif // INCLUDE_ALL_GCS // record this time so VMThread can keep track how much time has elapsed // since last safepoint. _end_of_last_safepoint = os::javaTimeMillis(); if (event.should_commit()) { --- 494,506 ---- // Release threads lock, so threads can be created/destroyed again. It will also starts all threads // blocked in signal_thread_blocked Threads_lock->unlock(); } ! ! GC::gc()->desynchronize_safepoint(); ! // record this time so VMThread can keep track how much time has elapsed // since last safepoint. _end_of_last_safepoint = os::javaTimeMillis(); if (event.should_commit()) {
*** 1037,1047 **** // the other registers. In order to preserve it over GCs we need // to keep it in a handle. oop result = caller_fr.saved_oop_result(&map); assert(result == NULL || result->is_oop(), "must be oop"); return_value = Handle(thread(), result); ! assert(Universe::heap()->is_in_or_null(result), "must be heap pointer"); } // Block the thread SafepointSynchronize::block(thread()); --- 1020,1030 ---- // the other registers. In order to preserve it over GCs we need // to keep it in a handle. oop result = caller_fr.saved_oop_result(&map); assert(result == NULL || result->is_oop(), "must be oop"); return_value = Handle(thread(), result); ! assert(GC::gc()->heap()->is_in_or_null(result), "must be heap pointer"); } // Block the thread SafepointSynchronize::block(thread());
< prev index next >