comparison src/share/vm/runtime/deoptimization.cpp @ 3018:5857923e563c

Fixed an issue with frame states in exception dispatch chains (now we are correctly rethrowing the exception immediately at entering the interpreter).
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Sat, 18 Jun 2011 19:13:55 +0200
parents b4ba003eb11d
children 77bb196828cb
comparison
equal deleted inserted replaced
3017:b4ba003eb11d 3018:5857923e563c
1237 1237
1238 methodHandle trap_method = trap_scope->method(); 1238 methodHandle trap_method = trap_scope->method();
1239 int trap_bci = trap_scope->bci(); 1239 int trap_bci = trap_scope->bci();
1240 Bytecodes::Code trap_bc = trap_method->java_code_at(trap_bci); 1240 Bytecodes::Code trap_bc = trap_method->java_code_at(trap_bci);
1241 1241
1242 if (trap_scope->rethrow_exception()) {
1243 tty->print_cr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Exception to be rethrown in the interpreter");
1244 GrowableArray<ScopeValue*>* expressions = trap_scope->expressions();
1245 ScopeValue* topOfStack = expressions->top();
1246 Handle topOfStackObj = cvf->create_stack_value(topOfStack)->get_obj();
1247 topOfStackObj->print();
1248 THREAD->set_pending_exception(topOfStackObj(), NULL, 0);
1249 }
1250
1242 // Record this event in the histogram. 1251 // Record this event in the histogram.
1243 gather_statistics(reason, action, trap_bc); 1252 gather_statistics(reason, action, trap_bc);
1244 1253
1245 // Ensure that we can record deopt. history: 1254 // Ensure that we can record deopt. history:
1246 bool create_if_missing = ProfileTraps; 1255 bool create_if_missing = ProfileTraps;
1405 // the MDO trap history so that the next compilation will 1414 // the MDO trap history so that the next compilation will
1406 // properly detect hot trap sites. 1415 // properly detect hot trap sites.
1407 reprofile = true; 1416 reprofile = true;
1408 break; 1417 break;
1409 case Action_make_not_entrant: 1418 case Action_make_not_entrant:
1419 case Action_rethrow_exception_in_interpreter:
1410 // Request immediate recompilation, and get rid of the old code. 1420 // Request immediate recompilation, and get rid of the old code.
1411 // Make them not entrant, so next time they are called they get 1421 // Make them not entrant, so next time they are called they get
1412 // recompiled. Unloaded classes are loaded now so recompile before next 1422 // recompiled. Unloaded classes are loaded now so recompile before next
1413 // time they are called. Same for uninitialized. The interpreter will 1423 // time they are called. Same for uninitialized. The interpreter will
1414 // link the missing class, if any. 1424 // link the missing class, if any.