comparison src/share/vm/runtime/deoptimization.cpp @ 24166:dad95e57f1de

Update MDO with Reason_not_compiled_exception_handler
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Mon, 14 Aug 2017 08:55:23 -0700
parents 23201e47b032
children
comparison
equal deleted inserted replaced
24165:fbcbf83757cb 24166:dad95e57f1de
1367 } 1367 }
1368 deoptimize_single_frame(thread, fr, reason); 1368 deoptimize_single_frame(thread, fr, reason);
1369 1369
1370 } 1370 }
1371 1371
1372 address Deoptimization::deoptimize_for_missing_exception_handler(nmethod* nm) {
1373 // there is no exception handler for this pc => deoptimize
1374 nm->make_not_entrant();
1375
1376 // Use Deoptimization::deoptimize for all of its side-effects:
1377 // revoking biases of monitors, gathering traps statistics, logging...
1378 // it also patches the return pc but we do not care about that
1379 // since we return a continuation to the deopt_blob below.
1380 JavaThread* thread = JavaThread::current();
1381 RegisterMap reg_map(thread, UseBiasedLocking);
1382 frame runtime_frame = thread->last_frame();
1383 frame caller_frame = runtime_frame.sender(&reg_map);
1384 assert(caller_frame.cb()->as_nmethod_or_null() == nm, "expect top frame nmethod");
1385 Deoptimization::deoptimize(thread, caller_frame, &reg_map, Deoptimization::Reason_not_compiled_exception_handler);
1386
1387 MethodData* trap_mdo = get_method_data(thread, nm->method(), true);
1388 trap_mdo->inc_trap_count(Deoptimization::Reason_not_compiled_exception_handler);
1389
1390 return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
1391 }
1372 1392
1373 void Deoptimization::deoptimize_frame_internal(JavaThread* thread, intptr_t* id, DeoptReason reason) { 1393 void Deoptimization::deoptimize_frame_internal(JavaThread* thread, intptr_t* id, DeoptReason reason) {
1374 assert(thread == Thread::current() || SafepointSynchronize::is_at_safepoint(), 1394 assert(thread == Thread::current() || SafepointSynchronize::is_at_safepoint(),
1375 "can only deoptimize other thread at a safepoint"); 1395 "can only deoptimize other thread at a safepoint");
1376 // Compute frame and register map based on thread and sp. 1396 // Compute frame and register map based on thread and sp.