diff src/share/vm/graal/graalVMEntries.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 681a227c332b
children fecdb0a65fb2
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMEntries.cpp	Sat Jun 18 19:46:14 2011 +0200
+++ b/src/share/vm/graal/graalVMEntries.cpp	Sat Jun 18 21:23:40 2011 +0200
@@ -39,7 +39,10 @@
 methodOop getMethodFromHotSpotMethod(oop hotspot_method) {
   oop reflected = HotSpotMethodResolved::javaMirror(hotspot_method);
   assert(reflected != NULL, "NULL not expected");
+  return (methodOop)reflected;
 
+  // (tw) Cannot use reflection code, because then the compiler can dead lock with the user application (test using -Xcomp).
+  /*
   // method is a handle to a java.lang.reflect.Method object
   oop mirror     = NULL;
   int slot       = 0;
@@ -58,7 +61,7 @@
 //  assert(instanceKlass::cast(k)->is_initialized(), "only initialized classes expected");
   methodOop m = instanceKlass::cast(k)->method_with_idnum(slot);
   assert(m != NULL, "deleted method?");
-  return m;
+  return m;*/
 }
 
 oop getReflectedMethod(methodOop method, TRAPS) {
@@ -368,7 +371,6 @@
 JNIEXPORT jobject JNICALL Java_com_oracle_graal_runtime_VMEntries_RiConstantPool_1lookupMethod(JNIEnv *env, jobject, jlong vmId, jint index, jbyte byteCode) {
   TRACE_graal_3("VMEntries::RiConstantPool_lookupMethod");
   VM_ENTRY_MARK;
-
   index = GraalCompiler::to_cp_index_u2(index);
   constantPoolHandle cp = VmIds::get<constantPoolOop>(vmId);