< prev index next >

src/hotspot/share/ci/ciMethod.cpp

Print this page

        

@@ -460,31 +460,10 @@
 }
 #endif // COMPILER1
 
 
 // ------------------------------------------------------------------
-// ciMethod::check_overflow
-//
-// Check whether the profile counter is overflowed and adjust if true.
-// For invoke* it will turn negative values into max_jint,
-// and for checkcast/aastore/instanceof turn positive values into min_jint.
-int ciMethod::check_overflow(int c, Bytecodes::Code code) {
-  switch (code) {
-    case Bytecodes::_aastore:    // fall-through
-    case Bytecodes::_checkcast:  // fall-through
-    case Bytecodes::_instanceof: {
-      return (c > 0 ? min_jint : c); // always non-positive
-    }
-    default: {
-      assert(Bytecodes::is_invoke(code), "%s", Bytecodes::name(code));
-      return (c < 0 ? max_jint : c); // always non-negative
-    }
-  }
-}
-
-
-// ------------------------------------------------------------------
 // ciMethod::call_profile_at_bci
 //
 // Get the ciCallProfile for the invocation of this method.
 // Also reports receiver types for non-call type checks (if TypeProfileCasts).
 ciCallProfile ciMethod::call_profile_at_bci(int bci) {

@@ -492,11 +471,11 @@
   ciCallProfile result;
   if (method_data() != NULL && method_data()->is_mature()) {
     ciProfileData* data = method_data()->bci_to_data(bci);
     if (data != NULL && data->is_CounterData()) {
       // Every profiled call site has a counter.
-      int count = check_overflow(data->as_CounterData()->count(), java_code_at_bci(bci));
+      int count = data->as_CounterData()->count();
 
       if (!data->is_ReceiverTypeData()) {
         result._receiver_count[0] = 0;  // that's a definite zero
       } else { // ReceiverTypeData is a subclass of CounterData
         ciReceiverTypeData* call = (ciReceiverTypeData*)data->as_ReceiverTypeData();

@@ -521,13 +500,13 @@
           }
         }
         for (uint i = 0; i < call->row_limit(); i++) {
           ciKlass* receiver = call->receiver(i);
           if (receiver == NULL)  continue;
-          int rcount = saturated_add(call->receiver_count(i), epsilon);
+          int rcount = call->receiver_count(i) + epsilon;
           if (rcount == 0) rcount = 1; // Should be valid value
-          receivers_count_total = saturated_add(receivers_count_total, rcount);
+          receivers_count_total += rcount;
           // Add the receiver to result data.
           result.add_receiver(receiver, rcount);
           // If we extend profiling to record methods,
           // we will set result._method also.
         }

@@ -553,11 +532,11 @@
         // Make the count consistent if this is a call profile. If count is
         // zero or less, presume that this is a typecheck profile and
         // do nothing.  Otherwise, increase count to be the sum of all
         // receiver's counts.
         if (count >= 0) {
-          count = saturated_add(count, receivers_count_total);
+          count += receivers_count_total;
         }
       }
       result._count = count;
     }
   }

@@ -1130,11 +1109,11 @@
   if (is_c1_compile(env->comp_level())) {
     _is_c1_compilable = false;
   } else {
     _is_c2_compilable = false;
   }
-  get_Method()->set_not_compilable(reason, env->comp_level());
+  get_Method()->set_not_compilable(env->comp_level(), true, reason);
 }
 
 // ------------------------------------------------------------------
 // ciMethod::can_be_osr_compiled
 //
< prev index next >