hotspot/src/share/vm/opto/graphKit.cpp
changeset 30185 4b08d63ac105
parent 29580 a67a581cfe11
child 30199 f99feb450c61
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Fri Mar 20 11:53:01 2015 +0100
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Mon Mar 16 12:24:06 2015 +0100
@@ -2795,18 +2795,15 @@
  */
 Node* GraphKit::maybe_cast_profiled_obj(Node* obj,
                                         ciKlass* type,
-                                        bool not_null,
-                                        SafePointNode* sfpt) {
+                                        bool not_null) {
   // type == NULL if profiling tells us this object is always null
   if (type != NULL) {
     Deoptimization::DeoptReason class_reason = Deoptimization::Reason_speculate_class_check;
     Deoptimization::DeoptReason null_reason = Deoptimization::Reason_speculate_null_check;
-    ciMethod* trap_method = (sfpt == NULL) ? method() : sfpt->jvms()->method();
-    int trap_bci = (sfpt == NULL) ? bci() : sfpt->jvms()->bci();
 
     if (!too_many_traps(null_reason) && !too_many_recompiles(null_reason) &&
-        !C->too_many_traps(trap_method, trap_bci, class_reason) &&
-        !C->too_many_recompiles(trap_method, trap_bci, class_reason)) {
+        !too_many_traps(class_reason) &&
+        !too_many_recompiles(class_reason)) {
       Node* not_null_obj = NULL;
       // not_null is true if we know the object is not null and
       // there's no need for a null check
@@ -2822,12 +2819,7 @@
       ciKlass* exact_kls = type;
       Node* slow_ctl  = type_check_receiver(exact_obj, exact_kls, 1.0,
                                             &exact_obj);
-      if (sfpt != NULL) {
-        GraphKit kit(sfpt->jvms());
-        PreserveJVMState pjvms(&kit);
-        kit.set_control(slow_ctl);
-        kit.uncommon_trap_exact(class_reason, Deoptimization::Action_maybe_recompile);
-      } else {
+      {
         PreserveJVMState pjvms(this);
         set_control(slow_ctl);
         uncommon_trap_exact(class_reason, Deoptimization::Action_maybe_recompile);