Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompiler.cpp @ 3020:9fed07e4a375
Changed from method/reflect object back to methodOop, because using method/reflection can create deadlock with the user application (test with -Xcomp). Disabled method caching by default and created a flag -G:StoreResultGraph (otherwise eclipse will fail because of being out of memory).
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Sat, 18 Jun 2011 21:23:40 +0200 |
parents | f00918f35c7f |
children | fecdb0a65fb2 |
comparison
equal
deleted
inserted
replaced
3019:77bb196828cb | 3020:9fed07e4a375 |
---|---|
204 } | 204 } |
205 | 205 |
206 instanceKlass::cast(HotSpotMethodResolved::klass())->initialize(CHECK_NULL); | 206 instanceKlass::cast(HotSpotMethodResolved::klass())->initialize(CHECK_NULL); |
207 Handle obj = instanceKlass::cast(HotSpotMethodResolved::klass())->allocate_instance(CHECK_NULL); | 207 Handle obj = instanceKlass::cast(HotSpotMethodResolved::klass())->allocate_instance(CHECK_NULL); |
208 assert(obj() != NULL, "must succeed in allocating instance"); | 208 assert(obj() != NULL, "must succeed in allocating instance"); |
209 | 209 |
210 HotSpotMethodResolved::set_compiler(obj, VMExits::compilerInstance()()); | 210 HotSpotMethodResolved::set_compiler(obj, VMExits::compilerInstance()()); |
211 oop reflected = getReflectedMethod(method(), CHECK_NULL); | 211 // (tw) Cannot use reflection here, because the compiler thread could dead lock with the running application. |
212 HotSpotMethodResolved::set_javaMirror(obj, reflected); | 212 // oop reflected = getReflectedMethod(method(), CHECK_NULL); |
213 HotSpotMethodResolved::set_javaMirror(obj, method()); | |
213 HotSpotMethodResolved::set_name(obj, name()); | 214 HotSpotMethodResolved::set_name(obj, name()); |
214 | 215 |
215 KlassHandle klass = method->method_holder(); | 216 KlassHandle klass = method->method_holder(); |
216 Handle holder_name = VmIds::toString<Handle>(klass->name(), CHECK_NULL); | 217 Handle holder_name = VmIds::toString<Handle>(klass->name(), CHECK_NULL); |
217 oop holder = GraalCompiler::createHotSpotTypeResolved(klass, holder_name, CHECK_NULL); | 218 oop holder = GraalCompiler::createHotSpotTypeResolved(klass, holder_name, CHECK_NULL); |
218 HotSpotMethodResolved::set_holder(obj, holder); | 219 HotSpotMethodResolved::set_holder(obj, holder); |
219 | 220 |
220 HotSpotMethodResolved::set_codeSize(obj, method->code_size()); | 221 HotSpotMethodResolved::set_codeSize(obj, method->code_size()); |
221 HotSpotMethodResolved::set_accessFlags(obj, method->access_flags().as_int()); | 222 HotSpotMethodResolved::set_accessFlags(obj, method->access_flags().as_int()); |
222 HotSpotMethodResolved::set_maxLocals(obj, method->max_locals()); | 223 HotSpotMethodResolved::set_maxLocals(obj, method->max_locals()); |
223 HotSpotMethodResolved::set_maxStackSize(obj, method->max_stack()); | 224 HotSpotMethodResolved::set_maxStackSize(obj, method->max_stack()); |
224 HotSpotMethodResolved::set_invocationCount(obj, method->invocation_count()); | 225 HotSpotMethodResolved::set_invocationCount(obj, method->invocation_count()); |
225 | 226 |
226 method->set_graal_mirror(obj()); | 227 method->set_graal_mirror(obj()); |
227 return obj(); | 228 return obj(); |
228 } | 229 } |
229 | 230 |
230 BasicType GraalCompiler::kindToBasicType(jchar ch) { | 231 BasicType GraalCompiler::kindToBasicType(jchar ch) { |