Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCompiler.cpp @ 16146:9b27e69f7cec
added -XX:+PrintBootstrap option to mirror -G:+PrintBoostrap option
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 19 Jun 2014 23:42:25 +0200 |
parents | d32be0297274 |
children | 4481cf549cfc |
comparison
equal
deleted
inserted
replaced
16145:237508bd73b9 | 16146:9b27e69f7cec |
---|---|
123 JavaThread* THREAD = JavaThread::current(); | 123 JavaThread* THREAD = JavaThread::current(); |
124 _bootstrapping = true; | 124 _bootstrapping = true; |
125 if (!UseGraalCompilationQueue) { | 125 if (!UseGraalCompilationQueue) { |
126 ResourceMark rm; | 126 ResourceMark rm; |
127 HandleMark hm; | 127 HandleMark hm; |
128 tty->print("Bootstrapping Graal"); | 128 if (PrintBootstrap) { |
129 tty->print("Bootstrapping Graal"); | |
130 } | |
129 jlong start = os::javaTimeMillis(); | 131 jlong start = os::javaTimeMillis(); |
130 | 132 |
131 Array<Method*>* objectMethods = InstanceKlass::cast(SystemDictionary::Object_klass())->methods(); | 133 Array<Method*>* objectMethods = InstanceKlass::cast(SystemDictionary::Object_klass())->methods(); |
132 // Initialize compile queue with a selected set of methods. | 134 // Initialize compile queue with a selected set of methods. |
133 int len = objectMethods->length(); | 135 int len = objectMethods->length(); |
145 int z = 0; | 147 int z = 0; |
146 do { | 148 do { |
147 os::sleep(THREAD, sleep_time, true); | 149 os::sleep(THREAD, sleep_time, true); |
148 sleep_time = 100; | 150 sleep_time = 100; |
149 qsize = CompileBroker::queue_size(CompLevel_full_optimization); | 151 qsize = CompileBroker::queue_size(CompLevel_full_optimization); |
150 while (z < (_compiled / 100)) { | 152 if (PrintBootstrap) { |
153 while (z < (_compiled / 100)) { | |
151 ++z; | 154 ++z; |
152 tty->print_raw("."); | 155 tty->print_raw("."); |
156 } | |
153 } | 157 } |
154 | |
155 } while (qsize != 0); | 158 } while (qsize != 0); |
156 | 159 |
157 tty->print_cr(" in %d ms (compiled %d methods)", os::javaTimeMillis() - start, _compiled); | 160 if (PrintBootstrap) { |
161 tty->print_cr(" in %d ms (compiled %d methods)", os::javaTimeMillis() - start, _compiled); | |
162 } | |
158 } else { | 163 } else { |
159 | 164 |
160 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/graal/hotspot/CompilationQueue", THREAD); | 165 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/graal/hotspot/CompilationQueue", THREAD); |
161 KlassHandle klass = GraalRuntime::load_required_class(name); | 166 KlassHandle klass = GraalRuntime::load_required_class(name); |
162 JavaValue result(T_VOID); | 167 JavaValue result(T_VOID); |