diff src/share/vm/graal/graalVMEntries.cpp @ 3487:b9ed7199f6fb

special handling for VirtualObject(Field) in IdentifyBlocksPhase (don't schedule out of loops), better toString for HotSpotMethod/Field
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 04 Aug 2011 18:52:50 +0200
parents 8cd198d7cbc1
children 25765a764212
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMEntries.cpp	Thu Aug 04 11:54:05 2011 +0200
+++ b/src/share/vm/graal/graalVMEntries.cpp	Thu Aug 04 18:52:50 2011 +0200
@@ -192,21 +192,19 @@
     methodOop method = getMethodFromHotSpotMethod(hotspot_method);
     cimethod = (ciMethod*)CURRENT_ENV->get_object(method);
   }
+  ciMethodData* method_data = cimethod->method_data();
 
-  ciMethodData* method_data = cimethod->method_data_or_null();
-  if (method_data == NULL) {
-    return -1;
+  if (method_data == NULL || !method_data->is_mature()) return -1;
+
+  ciProfileData* profile = method_data->bci_to_data(bci);
+  if (profile == NULL) {
+    return 0;
+  }
+  uint trap = method_data->trap_recompiled_at(profile);
+  if (trap > 0) {
+    return 100;
   } else {
-    ciProfileData* profile = method_data->bci_to_data(bci);
-    if (profile == NULL) {
-      return 0;
-    }
-    uint trap = method_data->trap_recompiled_at(profile);
-    if (trap > 0) {
-      return 100;
-    } else {
-      return trap;
-    }
+    return trap;
   }
 }