comparison src/share/vm/opto/runtime.cpp @ 7482:989155e2d07a

Merge with hs25-b15.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 16 Jan 2013 01:34:24 +0100
parents 2cb439954abf 2d6c433b1f38
children 4fc2763e670e
comparison
equal deleted inserted replaced
7381:6761a8f854a4 7482:989155e2d07a
987 if (JvmtiExport::can_post_on_exceptions()) { 987 if (JvmtiExport::can_post_on_exceptions()) {
988 // "Full-speed catching" is not necessary here, 988 // "Full-speed catching" is not necessary here,
989 // since we're notifying the VM on every catch. 989 // since we're notifying the VM on every catch.
990 // Force deoptimization and the rest of the lookup 990 // Force deoptimization and the rest of the lookup
991 // will be fine. 991 // will be fine.
992 deoptimize_caller_frame(thread, true); 992 deoptimize_caller_frame(thread);
993 } 993 }
994 994
995 // Check the stack guard pages. If enabled, look for handler in this frame; 995 // Check the stack guard pages. If enabled, look for handler in this frame;
996 // otherwise, forcibly unwind the frame. 996 // otherwise, forcibly unwind the frame.
997 // 997 //
1141 return TypeFunc::make(domain, range); 1141 return TypeFunc::make(domain, range);
1142 } 1142 }
1143 1143
1144 1144
1145 void OptoRuntime::deoptimize_caller_frame(JavaThread *thread, bool doit) { 1145 void OptoRuntime::deoptimize_caller_frame(JavaThread *thread, bool doit) {
1146 // Deoptimize frame 1146 // Deoptimize the caller before continuing, as the compiled
1147 if (doit) { 1147 // exception handler table may not be valid.
1148 // Called from within the owner thread, so no need for safepoint 1148 if (!StressCompiledExceptionHandlers && doit) {
1149 RegisterMap reg_map(thread); 1149 deoptimize_caller_frame(thread);
1150 frame stub_frame = thread->last_frame(); 1150 }
1151 assert(stub_frame.is_runtime_frame() || exception_blob()->contains(stub_frame.pc()), "sanity check"); 1151 }
1152 frame caller_frame = stub_frame.sender(&reg_map); 1152
1153 1153 void OptoRuntime::deoptimize_caller_frame(JavaThread *thread) {
1154 // Deoptimize the caller frame. 1154 // Called from within the owner thread, so no need for safepoint
1155 Deoptimization::deoptimize_frame(thread, caller_frame.id(), Deoptimization::Reason_constraint); 1155 RegisterMap reg_map(thread);
1156 } 1156 frame stub_frame = thread->last_frame();
1157 assert(stub_frame.is_runtime_frame() || exception_blob()->contains(stub_frame.pc()), "sanity check");
1158 frame caller_frame = stub_frame.sender(&reg_map);
1159
1160 // Deoptimize the caller frame.
1161 Deoptimization::deoptimize_frame(thread, caller_frame.id());
1157 } 1162 }
1158 1163
1159 1164
1160 bool OptoRuntime::is_deoptimized_caller_frame(JavaThread *thread) { 1165 bool OptoRuntime::is_deoptimized_caller_frame(JavaThread *thread) {
1161 // Called from within the owner thread, so no need for safepoint 1166 // Called from within the owner thread, so no need for safepoint