< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.cpp

Print this page

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

 73   if (Arguments::mode() == Arguments::_int) {
 74     // Nothing to do in -Xint mode
 75     return;
 76   }
 77   _bootstrapping = true;
 78   ResourceMark rm(THREAD);
 79   HandleMark hm(THREAD);
 80   if (PrintBootstrap) {
 81     tty->print("Bootstrapping JVMCI");
 82   }
 83   jlong start = os::javaTimeNanos();
 84 
 85   Array<Method*>* objectMethods = vmClasses::Object_klass()->methods();
 86   // Initialize compile queue with a selected set of methods.
 87   int len = objectMethods->length();
 88   for (int i = 0; i < len; i++) {
 89     methodHandle mh(THREAD, objectMethods->at(i));
 90     if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {
 91       ResourceMark rm;
 92       int hot_count = 10; // TODO: what's the appropriate value?
 93       CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, false, CompileTask::Reason_Bootstrap, CHECK);
 94     }
 95   }
 96 
 97   int qsize;
 98   bool first_round = true;
 99   int z = 0;
100   do {
101     // Loop until there is something in the queue.
102     do {
103       THREAD->sleep(100);
104       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
105     } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
106     first_round = false;
107     if (PrintBootstrap) {
108       while (z < (_methods_compiled / 100)) {
109         ++z;
110         tty->print_raw(".");
111       }
112     }
113   } while (qsize != 0);
< prev index next >