hotspot/src/share/vm/ci/ciMethod.cpp
changeset 46327 91576389a517
parent 43951 c23519aaccc1
parent 46326 70de7011f79a
child 46329 53ccc37bda19
equal deleted inserted replaced
44203:d2d435372329 46327:91576389a517
   502           ciKlass* receiver = call->receiver(i);
   502           ciKlass* receiver = call->receiver(i);
   503           if (receiver == NULL)  continue;
   503           if (receiver == NULL)  continue;
   504           morphism++;
   504           morphism++;
   505         }
   505         }
   506         int epsilon = 0;
   506         int epsilon = 0;
   507         if (TieredCompilation && ProfileInterpreter) {
   507         if (TieredCompilation) {
   508           // Interpreter and C1 treat final and special invokes differently.
   508           // For a call, it is assumed that either the type of the receiver(s)
   509           // C1 will record a type, whereas the interpreter will just
   509           // is recorded or an associated counter is incremented, but not both. With
   510           // increment the count. Detect this case.
   510           // tiered compilation, however, both can happen due to the interpreter and
       
   511           // C1 profiling invocations differently. Address that inconsistency here.
   511           if (morphism == 1 && count > 0) {
   512           if (morphism == 1 && count > 0) {
   512             epsilon = count;
   513             epsilon = count;
   513             count = 0;
   514             count = 0;
   514           }
   515           }
   515         }
   516         }
   523           result.add_receiver(receiver, rcount);
   524           result.add_receiver(receiver, rcount);
   524           // If we extend profiling to record methods,
   525           // If we extend profiling to record methods,
   525           // we will set result._method also.
   526           // we will set result._method also.
   526         }
   527         }
   527         // Determine call site's morphism.
   528         // Determine call site's morphism.
   528         // The call site count is 0 with known morphism (onlt 1 or 2 receivers)
   529         // The call site count is 0 with known morphism (only 1 or 2 receivers)
   529         // or < 0 in the case of a type check failured for checkcast, aastore, instanceof.
   530         // or < 0 in the case of a type check failure for checkcast, aastore, instanceof.
   530         // The call site count is > 0 in the case of a polymorphic virtual call.
   531         // The call site count is > 0 in the case of a polymorphic virtual call.
   531         if (morphism > 0 && morphism == result._limit) {
   532         if (morphism > 0 && morphism == result._limit) {
   532            // The morphism <= MorphismLimit.
   533            // The morphism <= MorphismLimit.
   533            if ((morphism <  ciCallProfile::MorphismLimit) ||
   534            if ((morphism <  ciCallProfile::MorphismLimit) ||
   534                (morphism == ciCallProfile::MorphismLimit && count == 0)) {
   535                (morphism == ciCallProfile::MorphismLimit && count == 0)) {