< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.cpp

Print this page

 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(".");
110       }
111     }
112   } while (qsize != 0);

 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, false, 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(".");
110       }
111     }
112   } while (qsize != 0);
< prev index next >