< prev index next >

src/share/vm/opto/runtime.cpp

Print this page




  55 #include "opto/graphKit.hpp"
  56 #include "opto/machnode.hpp"
  57 #include "opto/matcher.hpp"
  58 #include "opto/memnode.hpp"
  59 #include "opto/mulnode.hpp"
  60 #include "opto/runtime.hpp"
  61 #include "opto/subnode.hpp"
  62 #include "runtime/atomic.inline.hpp"
  63 #include "runtime/fprofiler.hpp"
  64 #include "runtime/handles.inline.hpp"
  65 #include "runtime/interfaceSupport.hpp"
  66 #include "runtime/javaCalls.hpp"
  67 #include "runtime/sharedRuntime.hpp"
  68 #include "runtime/signature.hpp"
  69 #include "runtime/threadCritical.hpp"
  70 #include "runtime/vframe.hpp"
  71 #include "runtime/vframeArray.hpp"
  72 #include "runtime/vframe_hp.hpp"
  73 #include "utilities/copy.hpp"
  74 #include "utilities/preserveException.hpp"

  75 
  76 
  77 // For debugging purposes:
  78 //  To force FullGCALot inside a runtime function, add the following two lines
  79 //
  80 //  Universe::release_fullgc_alot_dummy();
  81 //  MarkSweep::invoke(0, "Debugging");
  82 //
  83 // At command line specify the parameters: -XX:+FullGCALot -XX:FullGCALotStart=100000000
  84 
  85 
  86 
  87 
  88 // Compiled code entry points
  89 address OptoRuntime::_new_instance_Java                           = NULL;
  90 address OptoRuntime::_new_array_Java                              = NULL;
  91 address OptoRuntime::_new_array_nozero_Java                       = NULL;
  92 address OptoRuntime::_multianewarray2_Java                        = NULL;
  93 address OptoRuntime::_multianewarray3_Java                        = NULL;
  94 address OptoRuntime::_multianewarray4_Java                        = NULL;


1433 //       to handle deoptimized blobs
1434 //
1435 // However, there needs to be a safepoint check in the middle!  So compiled
1436 // safepoints are completely watertight.
1437 //
1438 // Thus, it cannot be a leaf since it contains the NoGCVerifier.
1439 //
1440 // *THIS IS NOT RECOMMENDED PROGRAMMING STYLE*
1441 //
1442 address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) {
1443 #ifndef PRODUCT
1444   SharedRuntime::_rethrow_ctr++;               // count rethrows
1445 #endif
1446   assert (exception != NULL, "should have thrown a NULLPointerException");
1447 #ifdef ASSERT
1448   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
1449     // should throw an exception here
1450     ShouldNotReachHere();
1451   }
1452 #endif



1453 
1454   thread->set_vm_result(exception);
1455   // Frame not compiled (handles deoptimization blob)
1456   return SharedRuntime::raw_exception_handler_for_return_address(thread, ret_pc);
1457 }
1458 
1459 
1460 const TypeFunc *OptoRuntime::rethrow_Type() {
1461   // create input type (domain)
1462   const Type **fields = TypeTuple::fields(1);
1463   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1464   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1,fields);
1465 
1466   // create result type (range)
1467   fields = TypeTuple::fields(1);
1468   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1469   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1, fields);
1470 
1471   return TypeFunc::make(domain, range);
1472 }




  55 #include "opto/graphKit.hpp"
  56 #include "opto/machnode.hpp"
  57 #include "opto/matcher.hpp"
  58 #include "opto/memnode.hpp"
  59 #include "opto/mulnode.hpp"
  60 #include "opto/runtime.hpp"
  61 #include "opto/subnode.hpp"
  62 #include "runtime/atomic.inline.hpp"
  63 #include "runtime/fprofiler.hpp"
  64 #include "runtime/handles.inline.hpp"
  65 #include "runtime/interfaceSupport.hpp"
  66 #include "runtime/javaCalls.hpp"
  67 #include "runtime/sharedRuntime.hpp"
  68 #include "runtime/signature.hpp"
  69 #include "runtime/threadCritical.hpp"
  70 #include "runtime/vframe.hpp"
  71 #include "runtime/vframeArray.hpp"
  72 #include "runtime/vframe_hp.hpp"
  73 #include "utilities/copy.hpp"
  74 #include "utilities/preserveException.hpp"
  75 #include "jvmtiThreadState.hpp"
  76 
  77 
  78 // For debugging purposes:
  79 //  To force FullGCALot inside a runtime function, add the following two lines
  80 //
  81 //  Universe::release_fullgc_alot_dummy();
  82 //  MarkSweep::invoke(0, "Debugging");
  83 //
  84 // At command line specify the parameters: -XX:+FullGCALot -XX:FullGCALotStart=100000000
  85 
  86 
  87 
  88 
  89 // Compiled code entry points
  90 address OptoRuntime::_new_instance_Java                           = NULL;
  91 address OptoRuntime::_new_array_Java                              = NULL;
  92 address OptoRuntime::_new_array_nozero_Java                       = NULL;
  93 address OptoRuntime::_multianewarray2_Java                        = NULL;
  94 address OptoRuntime::_multianewarray3_Java                        = NULL;
  95 address OptoRuntime::_multianewarray4_Java                        = NULL;


1434 //       to handle deoptimized blobs
1435 //
1436 // However, there needs to be a safepoint check in the middle!  So compiled
1437 // safepoints are completely watertight.
1438 //
1439 // Thus, it cannot be a leaf since it contains the NoGCVerifier.
1440 //
1441 // *THIS IS NOT RECOMMENDED PROGRAMMING STYLE*
1442 //
1443 address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) {
1444 #ifndef PRODUCT
1445   SharedRuntime::_rethrow_ctr++;               // count rethrows
1446 #endif
1447   assert (exception != NULL, "should have thrown a NULLPointerException");
1448 #ifdef ASSERT
1449   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
1450     // should throw an exception here
1451     ShouldNotReachHere();
1452   }
1453 #endif
1454 
1455   JvmtiThreadState *state = thread->jvmti_thread_state();
1456   state->set_exception_detected();
1457 
1458   thread->set_vm_result(exception);
1459   // Frame not compiled (handles deoptimization blob)
1460   return SharedRuntime::raw_exception_handler_for_return_address(thread, ret_pc);
1461 }
1462 
1463 
1464 const TypeFunc *OptoRuntime::rethrow_Type() {
1465   // create input type (domain)
1466   const Type **fields = TypeTuple::fields(1);
1467   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1468   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1,fields);
1469 
1470   // create result type (range)
1471   fields = TypeTuple::fields(1);
1472   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1473   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1, fields);
1474 
1475   return TypeFunc::make(domain, range);
1476 }


< prev index next >