< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.cpp

Print this page

 69 }
 70 
 71 void JVMCICompiler::bootstrap(TRAPS) {
 72   if (Arguments::mode() == Arguments::_int) {
 73     // Nothing to do in -Xint mode
 74     return;
 75   }
 76   _bootstrapping = true;
 77   ResourceMark rm(THREAD);
 78   HandleMark hm(THREAD);
 79   if (PrintBootstrap) {
 80     tty->print("Bootstrapping JVMCI");
 81   }
 82   jlong start = os::javaTimeNanos();
 83 
 84   Array<Method*>* objectMethods = vmClasses::Object_klass()->methods();
 85   // Initialize compile queue with a selected set of methods.
 86   int len = objectMethods->length();
 87   for (int i = 0; i < len; i++) {
 88     methodHandle mh(THREAD, objectMethods->at(i));
 89     if (!mh->is_native() && !mh->is_static() && !mh->is_object_initializer() && !mh->is_static_initializer()) {



 90       ResourceMark rm;
 91       int hot_count = 10; // TODO: what's the appropriate value?
 92       CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileTask::Reason_Bootstrap, CHECK);
 93     }
 94   }
 95 
 96   int qsize;
 97   bool first_round = true;
 98   int z = 0;
 99   do {
100     // Loop until there is something in the queue.
101     do {
102       THREAD->sleep(100);
103       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
104     } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
105     first_round = false;
106     if (PrintBootstrap) {
107       while (z < (_methods_compiled / 100)) {
108         ++z;
109         tty->print_raw(".");

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