< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.cpp

Print this page




  90   int z = 0;
  91   do {
  92     // Loop until there is something in the queue.
  93     do {
  94       os::sleep(THREAD, 100, true);
  95       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
  96     } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
  97     first_round = false;
  98     if (PrintBootstrap) {
  99       while (z < (_methods_compiled / 100)) {
 100         ++z;
 101         tty->print_raw(".");
 102       }
 103     }
 104   } while (qsize != 0);
 105 
 106   if (PrintBootstrap) {
 107     tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methods_compiled);
 108   }
 109   _bootstrapping = false;
 110   JVMCI::compiler_runtime()->bootstrap_finished(CHECK);
 111 }
 112 
 113 bool JVMCICompiler::force_comp_at_level_simple(Method *method) {




 114   if (UseJVMCINativeLibrary) {
 115     // This mechanism exists to force compilation of a JVMCI compiler by C1
 116     // to reduces the compilation time spent on the JVMCI compiler itself. In
 117     // +UseJVMCINativeLibrary mode, the JVMCI compiler is AOT compiled.
 118     return false;
 119   }
 120 
 121   if (_bootstrapping) {
 122     // When bootstrapping, the JVMCI compiler can compile its own methods.

 123     return false;
 124   }
 125 
 126   JVMCIRuntime* runtime = JVMCI::compiler_runtime();
 127   if (runtime != NULL && runtime->is_HotSpotJVMCIRuntime_initialized()) {
 128     JavaThread* thread = JavaThread::current();
 129     HandleMark hm(thread);
 130     THREAD_JVMCIENV(thread);
 131     JVMCIObject receiver = runtime->get_HotSpotJVMCIRuntime(JVMCIENV);
 132     objArrayHandle excludeModules(thread, HotSpotJVMCI::HotSpotJVMCIRuntime::excludeFromJVMCICompilation(JVMCIENV, HotSpotJVMCI::resolve(receiver)));
 133     if (excludeModules.not_null()) {
 134       ModuleEntry* moduleEntry = method->method_holder()->module();
 135       for (int i = 0; i < excludeModules->length(); i++) {
 136         if (oopDesc::equals(excludeModules->obj_at(i), moduleEntry->module())) {
 137           return true;
 138         }
 139       }
 140     }
 141   }
 142   return false;

 143 }
 144 
 145 // Compilation entry point for methods
 146 void JVMCICompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
 147   ShouldNotReachHere();
 148 }
 149 
 150 // Print compilation timers and statistics
 151 void JVMCICompiler::print_timers() {
 152   print_compilation_timers();
 153 }
 154 
 155 // Print compilation timers and statistics
 156 void JVMCICompiler::print_compilation_timers() {
 157   TRACE_jvmci_1("JVMCICompiler::print_timers");
 158   tty->print_cr("       JVMCI code install time:        %6.3f s",    _codeInstallTimer.seconds());
 159 }


  90   int z = 0;
  91   do {
  92     // Loop until there is something in the queue.
  93     do {
  94       os::sleep(THREAD, 100, true);
  95       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
  96     } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
  97     first_round = false;
  98     if (PrintBootstrap) {
  99       while (z < (_methods_compiled / 100)) {
 100         ++z;
 101         tty->print_raw(".");
 102       }
 103     }
 104   } while (qsize != 0);
 105 
 106   if (PrintBootstrap) {
 107     tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methods_compiled);
 108   }
 109   _bootstrapping = false;
 110   JVMCI::java_runtime()->bootstrap_finished(CHECK);
 111 }
 112 
 113 bool JVMCICompiler::force_comp_at_level_simple(Method *method) {
 114   if (_bootstrapping) {
 115     // When bootstrapping, the JVMCI compiler can compile its own methods.
 116     return false;
 117   }
 118   if (UseJVMCINativeLibrary) {
 119     // This mechanism exists to force compilation of a JVMCI compiler by C1
 120     // to reduce the compilation time spent on the JVMCI compiler itself. In
 121     // +UseJVMCINativeLibrary mode, the JVMCI compiler is AOT compiled.
 122     return false;
 123   } else {
 124     JVMCIRuntime* runtime = JVMCI::java_runtime();
 125     if (runtime != NULL) {
 126       JVMCIObject receiver = runtime->probe_HotSpotJVMCIRuntime();
 127       if (receiver.is_null()) {
 128         return false;
 129       }
 130       JVMCIEnv* ignored_env = NULL;
 131       objArrayHandle excludeModules(JavaThread::current(), HotSpotJVMCI::HotSpotJVMCIRuntime::excludeFromJVMCICompilation(ignored_env, HotSpotJVMCI::resolve(receiver)));






 132       if (excludeModules.not_null()) {
 133         ModuleEntry* moduleEntry = method->method_holder()->module();
 134         for (int i = 0; i < excludeModules->length(); i++) {
 135           if (oopDesc::equals(excludeModules->obj_at(i), moduleEntry->module())) {
 136             return true;
 137           }
 138         }
 139       }
 140     }
 141     return false;
 142   }
 143 }
 144 
 145 // Compilation entry point for methods
 146 void JVMCICompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
 147   ShouldNotReachHere();
 148 }
 149 
 150 // Print compilation timers and statistics
 151 void JVMCICompiler::print_timers() {
 152   print_compilation_timers();
 153 }
 154 
 155 // Print compilation timers and statistics
 156 void JVMCICompiler::print_compilation_timers() {
 157   TRACE_jvmci_1("JVMCICompiler::print_timers");
 158   tty->print_cr("       JVMCI code install time:        %6.3f s",    _codeInstallTimer.seconds());
 159 }
< prev index next >