8226699: [BACKOUT] JDK-8221734 Deoptimize with handshakes

Reviewed-by: dholmes, rehn, dlong
This commit is contained in:
Daniel D. Daugherty 2019-06-24 22:38:17 -04:00
parent cd598622cc
commit b0933034e0
28 changed files with 175 additions and 274 deletions

View file

@ -2903,17 +2903,18 @@ void JavaThread::make_zombies() {
#endif // PRODUCT
void JavaThread::deoptimize_marked_methods(bool in_handshake) {
void JavaThread::deoptimized_wrt_marked_nmethods() {
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(), in_handshake);
Deoptimization::deoptimize(this, *fst.current(), fst.register_map());
}
}
}
// If the caller is a NamedThread, then remember, in the current scope,
// the given JavaThread in its _processed_thread field.
class RememberProcessedThread: public StackObj {
@ -4652,6 +4653,13 @@ 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,