src/share/vm/runtime/deoptimization.cpp

changeset 2260
ce6848d0666d
parent 2169
fd5d4527cdf5
child 2314
f95d63e2154a
equal deleted inserted replaced
2257:0357ff4bd6b2 2260:ce6848d0666d
1063 deoptimize_single_frame(thread, fr); 1063 deoptimize_single_frame(thread, fr);
1064 1064
1065 } 1065 }
1066 1066
1067 1067
1068 void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) { 1068 void Deoptimization::deoptimize_frame_internal(JavaThread* thread, intptr_t* id) {
1069 assert(thread == Thread::current() || SafepointSynchronize::is_at_safepoint(),
1070 "can only deoptimize other thread at a safepoint");
1069 // Compute frame and register map based on thread and sp. 1071 // Compute frame and register map based on thread and sp.
1070 RegisterMap reg_map(thread, UseBiasedLocking); 1072 RegisterMap reg_map(thread, UseBiasedLocking);
1071 frame fr = thread->last_frame(); 1073 frame fr = thread->last_frame();
1072 while (fr.id() != id) { 1074 while (fr.id() != id) {
1073 fr = fr.sender(&reg_map); 1075 fr = fr.sender(&reg_map);
1074 } 1076 }
1075 deoptimize(thread, fr, &reg_map); 1077 deoptimize(thread, fr, &reg_map);
1078 }
1079
1080
1081 void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) {
1082 if (thread == Thread::current()) {
1083 Deoptimization::deoptimize_frame_internal(thread, id);
1084 } else {
1085 VM_DeoptimizeFrame deopt(thread, id);
1086 VMThread::execute(&deopt);
1087 }
1076 } 1088 }
1077 1089
1078 1090
1079 // JVMTI PopFrame support 1091 // JVMTI PopFrame support
1080 JRT_LEAF(void, Deoptimization::popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address)) 1092 JRT_LEAF(void, Deoptimization::popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address))

mercurial