< prev index next >
src/hotspot/share/prims/jni.cpp
Print this page
rev 56101 : 8227745: Enable Escape Analysis for better performance when debugging
Reviewed-by: ???
@@ -64,10 +64,11 @@
#include "prims/jvm_misc.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/atomic.hpp"
#include "runtime/compilationPolicy.hpp"
+#include "runtime/deoptimization.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
@@ -4140,10 +4141,14 @@
{ MutexLocker ml(Threads_lock);
// This must be inside this lock in order to get FullGCALot to work properly, i.e., to
// avoid this thread trying to do a GC before it is added to the thread-list
thread->set_active_handles(JNIHandleBlock::allocate_block());
Threads::add(thread, daemon);
+ // Avoid pushing frames with ea based optimizations while deoptimization is in progress
+ while (JVMTIEscapeBarrier::deoptimizing_objects_for_all_threads()) {
+ Threads_lock->wait();
+ }
}
// Create thread group and name info from attach arguments
oop group = NULL;
char* thread_name = NULL;
if (args != NULL && Threads::is_supported_jni_version(args->version)) {
< prev index next >