< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.cpp

Print this page




  50 }
  51 
  52 void JVMCICompiler::bootstrap(TRAPS) {
  53   if (Arguments::mode() == Arguments::_int) {
  54     // Nothing to do in -Xint mode
  55     return;
  56   }
  57   _bootstrapping = true;
  58   ResourceMark rm;
  59   HandleMark hm;
  60   if (PrintBootstrap) {
  61     tty->print("Bootstrapping JVMCI");
  62   }
  63   jlong start = os::javaTimeMillis();
  64 
  65   Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
  66   // Initialize compile queue with a selected set of methods.
  67   int len = objectMethods->length();
  68   for (int i = 0; i < len; i++) {
  69     methodHandle mh = objectMethods->at(i);
  70     if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {



  71       ResourceMark rm;
  72       int hot_count = 10; // TODO: what's the appropriate value?
  73       CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileTask::Reason_Bootstrap, THREAD);
  74     }
  75   }
  76 
  77   int qsize;
  78   bool first_round = true;
  79   int z = 0;
  80   do {
  81     // Loop until there is something in the queue.
  82     do {
  83       os::sleep(THREAD, 100, true);
  84       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
  85     } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
  86     first_round = false;
  87     if (PrintBootstrap) {
  88       while (z < (_methods_compiled / 100)) {
  89         ++z;
  90         tty->print_raw(".");




  50 }
  51 
  52 void JVMCICompiler::bootstrap(TRAPS) {
  53   if (Arguments::mode() == Arguments::_int) {
  54     // Nothing to do in -Xint mode
  55     return;
  56   }
  57   _bootstrapping = true;
  58   ResourceMark rm;
  59   HandleMark hm;
  60   if (PrintBootstrap) {
  61     tty->print("Bootstrapping JVMCI");
  62   }
  63   jlong start = os::javaTimeMillis();
  64 
  65   Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
  66   // Initialize compile queue with a selected set of methods.
  67   int len = objectMethods->length();
  68   for (int i = 0; i < len; i++) {
  69     methodHandle mh = objectMethods->at(i);
  70     if (!mh->is_native() &&
  71         !mh->is_static() &&
  72         !mh->is_object_constructor() &&
  73         !mh->is_class_initializer()) {
  74       ResourceMark rm;
  75       int hot_count = 10; // TODO: what's the appropriate value?
  76       CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileTask::Reason_Bootstrap, THREAD);
  77     }
  78   }
  79 
  80   int qsize;
  81   bool first_round = true;
  82   int z = 0;
  83   do {
  84     // Loop until there is something in the queue.
  85     do {
  86       os::sleep(THREAD, 100, true);
  87       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
  88     } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
  89     first_round = false;
  90     if (PrintBootstrap) {
  91       while (z < (_methods_compiled / 100)) {
  92         ++z;
  93         tty->print_raw(".");


< prev index next >