< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.cpp

Print this page

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



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

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