src/share/vm/jvmci/jvmciCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/jvmci

src/share/vm/jvmci/jvmciCompiler.cpp

Print this page
rev 10831 : 8153013: BlockingCompilation test times out
Summary: Task has no invocation count and get stale at once
Reviewed-by: kvn


  68   FlagSetting ctwOff(CompileTheWorld, false);
  69 #endif
  70 
  71   JavaThread* THREAD = JavaThread::current();
  72   _bootstrapping = true;
  73   ResourceMark rm;
  74   HandleMark hm;
  75   if (PrintBootstrap) {
  76     tty->print("Bootstrapping JVMCI");
  77   }
  78   jlong start = os::javaTimeMillis();
  79 
  80   Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
  81   // Initialize compile queue with a selected set of methods.
  82   int len = objectMethods->length();
  83   for (int i = 0; i < len; i++) {
  84     methodHandle mh = objectMethods->at(i);
  85     if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {
  86       ResourceMark rm;
  87       int hot_count = 10; // TODO: what's the appropriate value?
  88       CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, "bootstrap", THREAD);
  89     }
  90   }
  91 
  92   int qsize;
  93   bool first_round = true;
  94   int z = 0;
  95   do {
  96     // Loop until there is something in the queue.
  97     do {
  98       os::sleep(THREAD, 100, true);
  99       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
 100     } while (first_round && qsize == 0);
 101     first_round = false;
 102     if (PrintBootstrap) {
 103       while (z < (_methods_compiled / 100)) {
 104         ++z;
 105         tty->print_raw(".");
 106       }
 107     }
 108   } while (qsize != 0);




  68   FlagSetting ctwOff(CompileTheWorld, false);
  69 #endif
  70 
  71   JavaThread* THREAD = JavaThread::current();
  72   _bootstrapping = true;
  73   ResourceMark rm;
  74   HandleMark hm;
  75   if (PrintBootstrap) {
  76     tty->print("Bootstrapping JVMCI");
  77   }
  78   jlong start = os::javaTimeMillis();
  79 
  80   Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
  81   // Initialize compile queue with a selected set of methods.
  82   int len = objectMethods->length();
  83   for (int i = 0; i < len; i++) {
  84     methodHandle mh = objectMethods->at(i);
  85     if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {
  86       ResourceMark rm;
  87       int hot_count = 10; // TODO: what's the appropriate value?
  88       CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileBroker::Reason_Bootstrap, THREAD);
  89     }
  90   }
  91 
  92   int qsize;
  93   bool first_round = true;
  94   int z = 0;
  95   do {
  96     // Loop until there is something in the queue.
  97     do {
  98       os::sleep(THREAD, 100, true);
  99       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
 100     } while (first_round && qsize == 0);
 101     first_round = false;
 102     if (PrintBootstrap) {
 103       while (z < (_methods_compiled / 100)) {
 104         ++z;
 105         tty->print_raw(".");
 106       }
 107     }
 108   } while (qsize != 0);


src/share/vm/jvmci/jvmciCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File