src/share/vm/ci/ciMethod.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6923002 Sdiff src/share/vm/ci

src/share/vm/ci/ciMethod.cpp

Print this page




 428           if (receiver == NULL)  continue;
 429           morphism += 1;
 430           int rcount = call->receiver_count(i);
 431           if (rcount == 0) rcount = 1; // Should be valid value
 432           receivers_count_total += rcount;
 433           // Add the receiver to result data.
 434           result.add_receiver(receiver, rcount);
 435           // If we extend profiling to record methods,
 436           // we will set result._method also.
 437         }
 438         // Determine call site's morphism.
 439         // The call site count is 0 with known morphism (onlt 1 or 2 receivers)
 440         // or < 0 in the case of a type check failured for checkcast, aastore, instanceof.
 441         // The call site count is > 0 in the case of a polymorphic virtual call.
 442         if (morphism > 0 && morphism == result._limit) {
 443            // The morphism <= MorphismLimit.
 444            if ((morphism <  ciCallProfile::MorphismLimit) ||
 445                (morphism == ciCallProfile::MorphismLimit && count == 0)) {
 446 #ifdef ASSERT
 447              if (count > 0) {
 448                tty->print_cr("bci: %d", bci);

 449                this->print_codes();
 450                assert(false, "this call site should not be polymorphic");
 451              }
 452 #endif
 453              result._morphism = morphism;
 454            }
 455         }
 456         // Make the count consistent if this is a call profile. If count is
 457         // zero or less, presume that this is a typecheck profile and
 458         // do nothing.  Otherwise, increase count to be the sum of all
 459         // receiver's counts.
 460         if (count >= 0) {
 461           count += receivers_count_total;
 462         }
 463       }
 464       result._count = count;
 465     }
 466   }
 467   return result;
 468 }




 428           if (receiver == NULL)  continue;
 429           morphism += 1;
 430           int rcount = call->receiver_count(i);
 431           if (rcount == 0) rcount = 1; // Should be valid value
 432           receivers_count_total += rcount;
 433           // Add the receiver to result data.
 434           result.add_receiver(receiver, rcount);
 435           // If we extend profiling to record methods,
 436           // we will set result._method also.
 437         }
 438         // Determine call site's morphism.
 439         // The call site count is 0 with known morphism (onlt 1 or 2 receivers)
 440         // or < 0 in the case of a type check failured for checkcast, aastore, instanceof.
 441         // The call site count is > 0 in the case of a polymorphic virtual call.
 442         if (morphism > 0 && morphism == result._limit) {
 443            // The morphism <= MorphismLimit.
 444            if ((morphism <  ciCallProfile::MorphismLimit) ||
 445                (morphism == ciCallProfile::MorphismLimit && count == 0)) {
 446 #ifdef ASSERT
 447              if (count > 0) {
 448                this->print_short_name(tty);
 449                tty->print_cr(" @ bci:%d", bci);
 450                this->print_codes();
 451                assert(false, "this call site should not be polymorphic");
 452              }
 453 #endif
 454              result._morphism = morphism;
 455            }
 456         }
 457         // Make the count consistent if this is a call profile. If count is
 458         // zero or less, presume that this is a typecheck profile and
 459         // do nothing.  Otherwise, increase count to be the sum of all
 460         // receiver's counts.
 461         if (count >= 0) {
 462           count += receivers_count_total;
 463         }
 464       }
 465       result._count = count;
 466     }
 467   }
 468   return result;
 469 }


src/share/vm/ci/ciMethod.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File