src/share/vm/runtime/deoptimization.cpp

changeset 2260
ce6848d0666d
parent 2169
fd5d4527cdf5
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/runtime/deoptimization.cpp	Mon Oct 18 15:43:29 2010 -0700
     1.2 +++ b/src/share/vm/runtime/deoptimization.cpp	Tue Oct 19 16:14:34 2010 -0700
     1.3 @@ -1065,7 +1065,9 @@
     1.4  }
     1.5  
     1.6  
     1.7 -void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) {
     1.8 +void Deoptimization::deoptimize_frame_internal(JavaThread* thread, intptr_t* id) {
     1.9 +  assert(thread == Thread::current() || SafepointSynchronize::is_at_safepoint(),
    1.10 +         "can only deoptimize other thread at a safepoint");
    1.11    // Compute frame and register map based on thread and sp.
    1.12    RegisterMap reg_map(thread, UseBiasedLocking);
    1.13    frame fr = thread->last_frame();
    1.14 @@ -1076,6 +1078,16 @@
    1.15  }
    1.16  
    1.17  
    1.18 +void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) {
    1.19 +  if (thread == Thread::current()) {
    1.20 +    Deoptimization::deoptimize_frame_internal(thread, id);
    1.21 +  } else {
    1.22 +    VM_DeoptimizeFrame deopt(thread, id);
    1.23 +    VMThread::execute(&deopt);
    1.24 +  }
    1.25 +}
    1.26 +
    1.27 +
    1.28  // JVMTI PopFrame support
    1.29  JRT_LEAF(void, Deoptimization::popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address))
    1.30  {

mercurial