567 "polling page vectors safepoint stub not created yet");
568 stub = SharedRuntime::polling_page_vectors_safepoint_handler_blob()->entry_point();
569 } else {
570 assert(SharedRuntime::polling_page_safepoint_handler_blob() != NULL,
571 "polling page safepoint stub not created yet");
572 stub = SharedRuntime::polling_page_safepoint_handler_blob()->entry_point();
573 }
574 log_debug(safepoint)("... found polling page %s exception at pc = "
575 INTPTR_FORMAT ", stub =" INTPTR_FORMAT,
576 at_poll_return ? "return" : "loop",
577 (intptr_t)pc, (intptr_t)stub);
578 return stub;
579 }
580
581
582 oop SharedRuntime::retrieve_receiver( Symbol* sig, frame caller ) {
583 assert(caller.is_interpreted_frame(), "");
584 int args_size = ArgumentSizeComputer(sig).size() + 1;
585 assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack");
586 oop result = cast_to_oop(*caller.interpreter_frame_tos_at(args_size - 1));
587 assert(Universe::heap()->is_in(result) && result->is_oop(), "receiver must be an oop");
588 return result;
589 }
590
591
592 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception) {
593 if (JvmtiExport::can_post_on_exceptions()) {
594 vframeStream vfst(thread, true);
595 methodHandle method = methodHandle(thread, vfst.method());
596 address bcp = method()->bcp_from(vfst.bci());
597 JvmtiExport::post_exception_throw(thread, method(), bcp, h_exception());
598 }
599 Exceptions::_throw(thread, __FILE__, __LINE__, h_exception);
600 }
601
602 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Symbol* name, const char *message) {
603 Handle h_exception = Exceptions::new_exception(thread, name, message);
604 throw_and_post_jvmti_exception(thread, h_exception);
605 }
606
607 // The interpreter code to call this tracing function is only
|
567 "polling page vectors safepoint stub not created yet");
568 stub = SharedRuntime::polling_page_vectors_safepoint_handler_blob()->entry_point();
569 } else {
570 assert(SharedRuntime::polling_page_safepoint_handler_blob() != NULL,
571 "polling page safepoint stub not created yet");
572 stub = SharedRuntime::polling_page_safepoint_handler_blob()->entry_point();
573 }
574 log_debug(safepoint)("... found polling page %s exception at pc = "
575 INTPTR_FORMAT ", stub =" INTPTR_FORMAT,
576 at_poll_return ? "return" : "loop",
577 (intptr_t)pc, (intptr_t)stub);
578 return stub;
579 }
580
581
582 oop SharedRuntime::retrieve_receiver( Symbol* sig, frame caller ) {
583 assert(caller.is_interpreted_frame(), "");
584 int args_size = ArgumentSizeComputer(sig).size() + 1;
585 assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack");
586 oop result = cast_to_oop(*caller.interpreter_frame_tos_at(args_size - 1));
587 assert(GC::gc()->heap()->is_in(result) && result->is_oop(), "receiver must be an oop");
588 return result;
589 }
590
591
592 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception) {
593 if (JvmtiExport::can_post_on_exceptions()) {
594 vframeStream vfst(thread, true);
595 methodHandle method = methodHandle(thread, vfst.method());
596 address bcp = method()->bcp_from(vfst.bci());
597 JvmtiExport::post_exception_throw(thread, method(), bcp, h_exception());
598 }
599 Exceptions::_throw(thread, __FILE__, __LINE__, h_exception);
600 }
601
602 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Symbol* name, const char *message) {
603 Handle h_exception = Exceptions::new_exception(thread, name, message);
604 throw_and_post_jvmti_exception(thread, h_exception);
605 }
606
607 // The interpreter code to call this tracing function is only
|