< prev index next >

src/share/vm/runtime/deoptimization.cpp

Print this page




1391   if (thread == Thread::current()) {
1392     Deoptimization::deoptimize_frame_internal(thread, id, reason);
1393   } else {
1394     VM_DeoptimizeFrame deopt(thread, id, reason);
1395     VMThread::execute(&deopt);
1396   }
1397 }
1398 
1399 void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) {
1400   deoptimize_frame(thread, id, Reason_constraint);
1401 }
1402 
1403 // JVMTI PopFrame support
1404 JRT_LEAF(void, Deoptimization::popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address))
1405 {
1406   thread->popframe_preserve_args(in_ByteSize(bytes_to_save), start_address);
1407 }
1408 JRT_END
1409 
1410 MethodData*
1411 Deoptimization::get_method_data(JavaThread* thread, methodHandle m,
1412                                 bool create_if_missing) {
1413   Thread* THREAD = thread;
1414   MethodData* mdo = m()->method_data();
1415   if (mdo == NULL && create_if_missing && !HAS_PENDING_EXCEPTION) {
1416     // Build an MDO.  Ignore errors like OutOfMemory;
1417     // that simply means we won't have an MDO to update.
1418     Method::build_interpreter_method_data(m, THREAD);
1419     if (HAS_PENDING_EXCEPTION) {
1420       assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here");
1421       CLEAR_PENDING_EXCEPTION;
1422     }
1423     mdo = m()->method_data();
1424   }
1425   return mdo;
1426 }
1427 
1428 #if defined(COMPILER2) || defined(SHARK) || INCLUDE_JVMCI
1429 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS) {
1430   // in case of an unresolved klass entry, load the class.
1431   if (constant_pool->tag_at(index).is_unresolved_klass()) {




1391   if (thread == Thread::current()) {
1392     Deoptimization::deoptimize_frame_internal(thread, id, reason);
1393   } else {
1394     VM_DeoptimizeFrame deopt(thread, id, reason);
1395     VMThread::execute(&deopt);
1396   }
1397 }
1398 
1399 void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) {
1400   deoptimize_frame(thread, id, Reason_constraint);
1401 }
1402 
1403 // JVMTI PopFrame support
1404 JRT_LEAF(void, Deoptimization::popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address))
1405 {
1406   thread->popframe_preserve_args(in_ByteSize(bytes_to_save), start_address);
1407 }
1408 JRT_END
1409 
1410 MethodData*
1411 Deoptimization::get_method_data(JavaThread* thread, const methodHandle& m,
1412                                 bool create_if_missing) {
1413   Thread* THREAD = thread;
1414   MethodData* mdo = m()->method_data();
1415   if (mdo == NULL && create_if_missing && !HAS_PENDING_EXCEPTION) {
1416     // Build an MDO.  Ignore errors like OutOfMemory;
1417     // that simply means we won't have an MDO to update.
1418     Method::build_interpreter_method_data(m, THREAD);
1419     if (HAS_PENDING_EXCEPTION) {
1420       assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here");
1421       CLEAR_PENDING_EXCEPTION;
1422     }
1423     mdo = m()->method_data();
1424   }
1425   return mdo;
1426 }
1427 
1428 #if defined(COMPILER2) || defined(SHARK) || INCLUDE_JVMCI
1429 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS) {
1430   // in case of an unresolved klass entry, load the class.
1431   if (constant_pool->tag_at(index).is_unresolved_klass()) {


< prev index next >