Mercurial > hg > graal-jvmci-8
comparison src/share/vm/compiler/compileBroker.cpp @ 3476:65981c23c1d6
Fixed bootstrap (lowered compilation threshold and register more methods for compilation)
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 03 Aug 2011 11:35:30 -0700 |
parents | be4ca325525a |
children | 22d11b3bc561 |
comparison
equal
deleted
inserted
replaced
3475:0da7f6b247c9 | 3476:65981c23c1d6 |
---|---|
640 _perf_compiles = PerfDataManager::create_counter(SUN_CI, name, | 640 _perf_compiles = PerfDataManager::create_counter(SUN_CI, name, |
641 PerfData::U_Events, CHECK); | 641 PerfData::U_Events, CHECK); |
642 } | 642 } |
643 } | 643 } |
644 | 644 |
645 void CompileBroker::add_method_to_queue(klassOop k, Symbol* name, Symbol* signature) { | |
646 Thread* THREAD = Thread::current(); | |
647 instanceKlass* klass = instanceKlass::cast(k); | |
648 methodOop method = klass->find_method(name, signature); | |
649 CompileBroker::compile_method(method, -1, 0, method, 0, "initial compile of object initializer", THREAD); | |
650 if (HAS_PENDING_EXCEPTION) { | |
651 CLEAR_PENDING_EXCEPTION; | |
652 fatal("error inserting method into compile queue"); | |
653 } | |
654 } | |
655 | |
645 // Bootstrap the graal compiler. Compiles all methods until compile queue is empty and no compilation is active. | 656 // Bootstrap the graal compiler. Compiles all methods until compile queue is empty and no compilation is active. |
646 void CompileBroker::bootstrap_graal() { | 657 void CompileBroker::bootstrap_graal() { |
647 HandleMark hm; | 658 HandleMark hm; |
648 Thread* THREAD = Thread::current(); | 659 Thread* THREAD = Thread::current(); |
649 tty->print_cr("Bootstrapping graal...."); | 660 tty->print_cr("Bootstrapping graal...."); |
650 | 661 |
651 GraalCompiler* compiler = GraalCompiler::instance(); | 662 GraalCompiler* compiler = GraalCompiler::instance(); |
652 if (compiler == NULL) fatal("must use flag -XX:+UseGraal"); | 663 if (compiler == NULL) fatal("must use flag -XX:+UseGraal"); |
653 | 664 |
654 jlong start = os::javaTimeMillis(); | 665 jlong start = os::javaTimeMillis(); |
655 | 666 add_method_to_queue(SystemDictionary::Object_klass(), vmSymbols::object_initializer_name(), vmSymbols::void_method_signature()); |
656 instanceKlass* klass = (instanceKlass*)SystemDictionary::Object_klass()->klass_part(); | 667 add_method_to_queue(SystemDictionary::Object_klass(), vmSymbols::equals_name(), vmSymbols::object_boolean_signature()); |
657 methodOop method = klass->find_method(vmSymbols::object_initializer_name(), vmSymbols::void_method_signature()); | 668 add_method_to_queue(SystemDictionary::String_klass(), vmSymbols::length_name(), vmSymbols::void_int_signature()); |
658 CompileBroker::compile_method(method, -1, 0, method, 0, "initial compile of object initializer", THREAD); | 669 add_method_to_queue(SystemDictionary::String_klass(), vmSymbols::object_initializer_name(), vmSymbols::void_method_signature()); |
659 if (HAS_PENDING_EXCEPTION) { | |
660 CLEAR_PENDING_EXCEPTION; | |
661 fatal("error inserting object initializer into compile queue"); | |
662 } | |
663 | 670 |
664 int z = 0; | 671 int z = 0; |
665 while (true) { | 672 while (true) { |
666 { | 673 { |
667 HandleMark hm; | 674 HandleMark hm; |