< prev index next >

src/share/vm/memory/gcLocker.cpp

Print this page




 209   : No_Safepoint_Verifier(true, JRT_Leaf_Verifier::should_verify_GC())
 210 {
 211 }
 212 
 213 JRT_Leaf_Verifier::~JRT_Leaf_Verifier()
 214 {
 215 }
 216 
 217 bool JRT_Leaf_Verifier::should_verify_GC() {
 218   switch (JavaThread::current()->thread_state()) {
 219   case _thread_in_Java:
 220     // is in a leaf routine, there must be no safepoint.
 221     return true;
 222   case _thread_in_native:
 223     // A native thread is not subject to safepoints.
 224     // Even while it is in a leaf routine, GC is ok
 225     return false;
 226   default:
 227     // Leaf routines cannot be called from other contexts.
 228     ShouldNotReachHere();
 229     return false;
 230   }
 231 }
 232 #endif


 209   : No_Safepoint_Verifier(true, JRT_Leaf_Verifier::should_verify_GC())
 210 {
 211 }
 212 
 213 JRT_Leaf_Verifier::~JRT_Leaf_Verifier()
 214 {
 215 }
 216 
 217 bool JRT_Leaf_Verifier::should_verify_GC() {
 218   switch (JavaThread::current()->thread_state()) {
 219   case _thread_in_Java:
 220     // is in a leaf routine, there must be no safepoint.
 221     return true;
 222   case _thread_in_native:
 223     // A native thread is not subject to safepoints.
 224     // Even while it is in a leaf routine, GC is ok
 225     return false;
 226   default:
 227     // Leaf routines cannot be called from other contexts.
 228     ShouldNotReachHere();

 229   }
 230 }
 231 #endif
< prev index next >