< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.cpp

Print this page
rev 55090 : secret-sfac


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



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




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


< prev index next >