< prev index next >

src/share/vm/runtime/sharedRuntime.cpp

Print this page

        

@@ -89,10 +89,12 @@
 RuntimeStub*        SharedRuntime::_wrong_method_abstract_blob;
 RuntimeStub*        SharedRuntime::_ic_miss_blob;
 RuntimeStub*        SharedRuntime::_resolve_opt_virtual_call_blob;
 RuntimeStub*        SharedRuntime::_resolve_virtual_call_blob;
 RuntimeStub*        SharedRuntime::_resolve_static_call_blob;
+address             SharedRuntime::_memento_stack_trace_return_handler;
+address             SharedRuntime::_memento_stack_trace_exception_handler;
 
 DeoptimizationBlob* SharedRuntime::_deopt_blob;
 SafepointBlob*      SharedRuntime::_polling_page_vectors_safepoint_handler_blob;
 SafepointBlob*      SharedRuntime::_polling_page_safepoint_handler_blob;
 SafepointBlob*      SharedRuntime::_polling_page_return_handler_blob;

@@ -109,10 +111,12 @@
   _ic_miss_blob                        = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss),  "ic_miss_stub");
   _resolve_opt_virtual_call_blob       = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C),   "resolve_opt_virtual_call");
   _resolve_virtual_call_blob           = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C),       "resolve_virtual_call");
   _resolve_static_call_blob            = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C),        "resolve_static_call");
 
+  generate_memento_stack_trace_blob();
+
 #ifdef COMPILER2
   // Vectors are generated only by C2.
   if (is_wide_vector(MaxVectorSize)) {
     _polling_page_vectors_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_VECTOR_LOOP);
   }

@@ -517,10 +521,14 @@
   // Interpreted code
   if (Interpreter::contains(return_address)) {
     return Interpreter::rethrow_exception_entry();
   }
 
+  if (SharedRuntime::is_memento_stack_trace_return_handler(return_address)) {
+    return SharedRuntime::get_memento_stack_trace_exception_handler();
+  }
+
   guarantee(blob == NULL || !blob->is_runtime_stub(), "caller should have skipped stub");
   guarantee(!VtableStubs::contains(return_address), "NULL exceptions in vtables should have been handled already!");
 
 #ifndef PRODUCT
   { ResourceMark rm;
< prev index next >