< prev index next >
src/hotspot/share/prims/jvm.cpp
Print this page
rev 56101 : 8227745: Enable Escape Analysis for better performance when debugging
Reviewed-by: ???
*** 2744,2753 ****
--- 2744,2758 ----
{
// Ensure that the C++ Thread and OSThread structures aren't freed before
// we operate.
MutexLocker mu(Threads_lock);
+ while (JVMTIEscapeBarrier::deoptimizing_objects_for_all_threads()) {
+ // Must not add new threads that push frames with ea based optimizations
+ Threads_lock->wait(0, Monitor::_as_suspend_equivalent_flag);
+ }
+
// Since JDK 5 the java.lang.Thread threadStatus is used to prevent
// re-starting an already started thread, so we should usually find
// that the JavaThread is null. However for a JNI attached thread
// there is a small window between the Thread object being created
// (with its JavaThread set) and the update to its threadStatus, so we
< prev index next >