52
53 void JVMCICompiler::bootstrap(TRAPS) {
54 assert(THREAD->is_Java_thread(), "must be");
55 if (Arguments::mode() == Arguments::_int) {
56 // Nothing to do in -Xint mode
57 return;
58 }
59 _bootstrapping = true;
60 ResourceMark rm;
61 HandleMark hm;
62 if (PrintBootstrap) {
63 tty->print("Bootstrapping JVMCI");
64 }
65 jlong start = os::javaTimeNanos();
66
67 Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
68 // Initialize compile queue with a selected set of methods.
69 int len = objectMethods->length();
70 for (int i = 0; i < len; i++) {
71 methodHandle mh(THREAD, objectMethods->at(i));
72 if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {
73 ResourceMark rm;
74 int hot_count = 10; // TODO: what's the appropriate value?
75 CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileTask::Reason_Bootstrap, THREAD);
76 }
77 }
78
79 int qsize;
80 bool first_round = true;
81 int z = 0;
82 do {
83 // Loop until there is something in the queue.
84 do {
85 ((JavaThread*)THREAD)->sleep(100);
86 qsize = CompileBroker::queue_size(CompLevel_full_optimization);
87 } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
88 first_round = false;
89 if (PrintBootstrap) {
90 while (z < (_methods_compiled / 100)) {
91 ++z;
92 tty->print_raw(".");
|
52
53 void JVMCICompiler::bootstrap(TRAPS) {
54 assert(THREAD->is_Java_thread(), "must be");
55 if (Arguments::mode() == Arguments::_int) {
56 // Nothing to do in -Xint mode
57 return;
58 }
59 _bootstrapping = true;
60 ResourceMark rm;
61 HandleMark hm;
62 if (PrintBootstrap) {
63 tty->print("Bootstrapping JVMCI");
64 }
65 jlong start = os::javaTimeNanos();
66
67 Array<Method*>* objectMethods = SystemDictionary::Object_klass()->methods();
68 // Initialize compile queue with a selected set of methods.
69 int len = objectMethods->length();
70 for (int i = 0; i < len; i++) {
71 methodHandle mh(THREAD, objectMethods->at(i));
72 if (!mh->is_native() &&
73 !mh->is_static() &&
74 !mh->is_object_constructor() &&
75 !mh->is_class_initializer()) {
76 ResourceMark rm;
77 int hot_count = 10; // TODO: what's the appropriate value?
78 CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileTask::Reason_Bootstrap, THREAD);
79 }
80 }
81
82 int qsize;
83 bool first_round = true;
84 int z = 0;
85 do {
86 // Loop until there is something in the queue.
87 do {
88 ((JavaThread*)THREAD)->sleep(100);
89 qsize = CompileBroker::queue_size(CompLevel_full_optimization);
90 } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
91 first_round = false;
92 if (PrintBootstrap) {
93 while (z < (_methods_compiled / 100)) {
94 ++z;
95 tty->print_raw(".");
|