changeset 19943:6a0692faf9fd

Ignore -Xbatch when the thread is in the middle of class loading
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 18 Mar 2015 10:01:25 -0700
parents a3ffdf6ec408
children f73a6e260e0c
files src/share/vm/compiler/compileBroker.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp	Tue Mar 17 19:24:47 2015 -0700
+++ b/src/share/vm/compiler/compileBroker.cpp	Wed Mar 18 10:01:25 2015 -0700
@@ -1220,10 +1220,12 @@
         blocking = false;
       }
 
-      // Don't allow blocking compiles if inside a class initializer
+      // Don't allow blocking compiles if inside a class initializer or while performing class loading
       vframeStream vfst((JavaThread*) thread);
       for (; !vfst.at_end(); vfst.next()) {
-        if (vfst.method()->is_static_initializer()) {
+        if (vfst.method()->is_static_initializer() ||
+            (vfst.method()->method_holder()->is_subclass_of(SystemDictionary::ClassLoader_klass()) &&
+             vfst.method()->name() == vmSymbols::loadClass_name())) {
           blocking = false;
           break;
         }