Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.cpp Sat Jun 18 19:46:14 2011 +0200 +++ b/src/share/vm/graal/graalCompiler.cpp Sat Jun 18 21:23:40 2011 +0200 @@ -206,23 +206,24 @@ instanceKlass::cast(HotSpotMethodResolved::klass())->initialize(CHECK_NULL); Handle obj = instanceKlass::cast(HotSpotMethodResolved::klass())->allocate_instance(CHECK_NULL); assert(obj() != NULL, "must succeed in allocating instance"); - + HotSpotMethodResolved::set_compiler(obj, VMExits::compilerInstance()()); - oop reflected = getReflectedMethod(method(), CHECK_NULL); - HotSpotMethodResolved::set_javaMirror(obj, reflected); + // (tw) Cannot use reflection here, because the compiler thread could dead lock with the running application. + // oop reflected = getReflectedMethod(method(), CHECK_NULL); + HotSpotMethodResolved::set_javaMirror(obj, method()); HotSpotMethodResolved::set_name(obj, name()); - + KlassHandle klass = method->method_holder(); Handle holder_name = VmIds::toString<Handle>(klass->name(), CHECK_NULL); oop holder = GraalCompiler::createHotSpotTypeResolved(klass, holder_name, CHECK_NULL); HotSpotMethodResolved::set_holder(obj, holder); - + HotSpotMethodResolved::set_codeSize(obj, method->code_size()); HotSpotMethodResolved::set_accessFlags(obj, method->access_flags().as_int()); HotSpotMethodResolved::set_maxLocals(obj, method->max_locals()); HotSpotMethodResolved::set_maxStackSize(obj, method->max_stack()); HotSpotMethodResolved::set_invocationCount(obj, method->invocation_count()); - + method->set_graal_mirror(obj()); return obj(); }