hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
changeset 5334 b2d040a8d375
parent 5055 743f38c6e179
child 5687 b862d1f189bd
child 5547 f4b087cbb361
equal deleted inserted replaced
5333:bb01e3adecb4 5334:b2d040a8d375
  1763       (x->exception()->as_NewInstance() == NULL && x->exception()->as_ExceptionObject() == NULL)) {
  1763       (x->exception()->as_NewInstance() == NULL && x->exception()->as_ExceptionObject() == NULL)) {
  1764     // if the exception object wasn't created using new then it might be null.
  1764     // if the exception object wasn't created using new then it might be null.
  1765     __ null_check(exception_opr, new CodeEmitInfo(info, true));
  1765     __ null_check(exception_opr, new CodeEmitInfo(info, true));
  1766   }
  1766   }
  1767 
  1767 
  1768   if (compilation()->env()->jvmti_can_post_on_exceptions() &&
  1768   if (compilation()->env()->jvmti_can_post_on_exceptions()) {
  1769       !block()->is_set(BlockBegin::default_exception_handler_flag)) {
       
  1770     // we need to go through the exception lookup path to get JVMTI
  1769     // we need to go through the exception lookup path to get JVMTI
  1771     // notification done
  1770     // notification done
  1772     unwind = false;
  1771     unwind = false;
  1773   }
  1772   }
  1774 
  1773 
  1775   assert(!block()->is_set(BlockBegin::default_exception_handler_flag) || unwind,
       
  1776          "should be no more handlers to dispatch to");
       
  1777 
       
  1778   if (compilation()->env()->dtrace_method_probes() &&
       
  1779       block()->is_set(BlockBegin::default_exception_handler_flag)) {
       
  1780     // notify that this frame is unwinding
       
  1781     BasicTypeList signature;
       
  1782     signature.append(T_INT);    // thread
       
  1783     signature.append(T_OBJECT); // methodOop
       
  1784     LIR_OprList* args = new LIR_OprList();
       
  1785     args->append(getThreadPointer());
       
  1786     LIR_Opr meth = new_register(T_OBJECT);
       
  1787     __ oop2reg(method()->constant_encoding(), meth);
       
  1788     args->append(meth);
       
  1789     call_runtime(&signature, args, CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), voidType, NULL);
       
  1790   }
       
  1791 
       
  1792   // move exception oop into fixed register
  1774   // move exception oop into fixed register
  1793   __ move(exception_opr, exceptionOopOpr());
  1775   __ move(exception_opr, exceptionOopOpr());
  1794 
  1776 
  1795   if (unwind) {
  1777   if (unwind) {
  1796     __ unwind_exception(LIR_OprFact::illegalOpr, exceptionOopOpr(), info);
  1778     __ unwind_exception(exceptionOopOpr());
  1797   } else {
  1779   } else {
  1798     __ throw_exception(exceptionPcOpr(), exceptionOopOpr(), info);
  1780     __ throw_exception(exceptionPcOpr(), exceptionOopOpr(), info);
  1799   }
  1781   }
  1800 }
  1782 }
  1801 
  1783