8221734: Deoptimize with handshakes

Reviewed-by: dcubed, dholmes, pchilanomate, dlong, coleenp
This commit is contained in:
Robbin Ehn 2019-05-23 10:13:29 +02:00
parent 4ea77d3e78
commit 9baafa55a6
28 changed files with 274 additions and 175 deletions

View file

@ -2832,18 +2832,17 @@ void JavaThread::make_zombies() {
#endif // PRODUCT
void JavaThread::deoptimized_wrt_marked_nmethods() {
void JavaThread::deoptimize_marked_methods(bool in_handshake) {
if (!has_last_Java_frame()) return;
// BiasedLocking needs an updated RegisterMap for the revoke monitors pass
StackFrameStream fst(this, UseBiasedLocking);
for (; !fst.is_done(); fst.next()) {
if (fst.current()->should_be_deoptimized()) {
Deoptimization::deoptimize(this, *fst.current(), fst.register_map());
Deoptimization::deoptimize(this, *fst.current(), fst.register_map(), in_handshake);
}
}
}
// If the caller is a NamedThread, then remember, in the current scope,
// the given JavaThread in its _processed_thread field.
class RememberProcessedThread: public StackObj {
@ -4578,13 +4577,6 @@ void Threads::metadata_handles_do(void f(Metadata*)) {
threads_do(&handles_closure);
}
void Threads::deoptimized_wrt_marked_nmethods() {
ALL_JAVA_THREADS(p) {
p->deoptimized_wrt_marked_nmethods();
}
}
// Get count Java threads that are waiting to enter the specified monitor.
GrowableArray<JavaThread*>* Threads::get_pending_threads(ThreadsList * t_list,
int count,