67 FlagSetting ctwOff(CompileTheWorld, false);
68 #endif
69
70 JavaThread* THREAD = JavaThread::current();
71 _bootstrapping = true;
72 ResourceMark rm;
73 HandleMark hm;
74 if (PrintBootstrap) {
75 tty->print("Bootstrapping JVMCI");
76 }
77 jlong start = os::javaTimeMillis();
78
79 Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
80 // Initialize compile queue with a selected set of methods.
81 int len = objectMethods->length();
82 for (int i = 0; i < len; i++) {
83 methodHandle mh = objectMethods->at(i);
84 if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {
85 ResourceMark rm;
86 int hot_count = 10; // TODO: what's the appropriate value?
87 CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, "bootstrap", THREAD);
88 }
89 }
90
91 int qsize;
92 bool first_round = true;
93 int z = 0;
94 do {
95 // Loop until there is something in the queue.
96 do {
97 os::sleep(THREAD, 100, true);
98 qsize = CompileBroker::queue_size(CompLevel_full_optimization);
99 } while (first_round && qsize == 0);
100 first_round = false;
101 if (PrintBootstrap) {
102 while (z < (_methods_compiled / 100)) {
103 ++z;
104 tty->print_raw(".");
105 }
106 }
107 } while (qsize != 0);
|
67 FlagSetting ctwOff(CompileTheWorld, false);
68 #endif
69
70 JavaThread* THREAD = JavaThread::current();
71 _bootstrapping = true;
72 ResourceMark rm;
73 HandleMark hm;
74 if (PrintBootstrap) {
75 tty->print("Bootstrapping JVMCI");
76 }
77 jlong start = os::javaTimeMillis();
78
79 Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
80 // Initialize compile queue with a selected set of methods.
81 int len = objectMethods->length();
82 for (int i = 0; i < len; i++) {
83 methodHandle mh = objectMethods->at(i);
84 if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {
85 ResourceMark rm;
86 int hot_count = 10; // TODO: what's the appropriate value?
87 CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, "bootstrap", false, THREAD);
88 }
89 }
90
91 int qsize;
92 bool first_round = true;
93 int z = 0;
94 do {
95 // Loop until there is something in the queue.
96 do {
97 os::sleep(THREAD, 100, true);
98 qsize = CompileBroker::queue_size(CompLevel_full_optimization);
99 } while (first_round && qsize == 0);
100 first_round = false;
101 if (PrintBootstrap) {
102 while (z < (_methods_compiled / 100)) {
103 ++z;
104 tty->print_raw(".");
105 }
106 }
107 } while (qsize != 0);
|