Пример #1
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   int entries = getLength(data, pos) / MULTI_BRANCH_DATA_ROW_SIZE_IN_CELLS;
   sb.append(format("entries(%d)", entries));
   for (int i = 0; i < entries; i++) {
     sb.append(
         format(
             "%n  %d: count(%d) displacement(%d)",
             i,
             data.readUnsignedInt(pos, getCountOffset(i)),
             data.readUnsignedInt(pos, getDisplacementOffset(i))));
   }
   return sb;
 }
Пример #2
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   RawItemProfile<ResolvedJavaMethod> profile = getRawMethodProfile(data, pos);
   super.appendTo(
           sb.append(format("exception_seen(%s) ", getExceptionSeen(data, pos))), data, pos)
       .append(format("%nmethod_entries(%d)", profile.entries));
   for (int i = 0; i < profile.entries; i++) {
     long count = profile.counts[i];
     sb.append(
         format(
             "%n  %s (%d, %4.2f)",
             profile.items[i].format("%H.%n(%p)"), count, (double) count / profile.totalCount));
   }
   return sb;
 }
Пример #3
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   return sb.append(
       format(
           "taken(%d) displacement(%d)",
           getExecutionCount(data, pos), getTakenDisplacement(data, pos)));
 }
Пример #4
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   return sb.append(
       format(
           "count(%d) null_seen(%s) exception_seen(%s)",
           getCounterValue(data, pos), getNullSeen(data, pos), getExceptionSeen(data, pos)));
 }
Пример #5
0
  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    String nl = String.format("%n");
    String nlIndent = String.format("%n%38s", "");
    if (hasNormalData()) {
      int pos = 0;
      HotSpotMethodDataAccessor data;
      while ((data = getNormalData(pos)) != null) {
        if (pos != 0) {
          sb.append(nl);
        }
        int bci = data.getBCI(this, pos);
        sb.append(String.format("%-6d bci: %-6d%-20s", pos, bci, data.getClass().getSimpleName()));
        sb.append(data.appendTo(new StringBuilder(), this, pos).toString().replace(nl, nlIndent));
        pos = pos + data.getSize(this, pos);
      }
    }

    if (hasExtraData()) {
      int pos = getExtraDataBeginOffset();
      HotSpotMethodDataAccessor data;
      while ((data = getExtraData(pos)) != null) {
        if (pos == getExtraDataBeginOffset()) {
          sb.append(nl).append("--- Extra data:");
        }
        int bci = data.getBCI(this, pos);
        sb.append(
            String.format("%n%-6d bci: %-6d%-20s", pos, bci, data.getClass().getSimpleName()));
        sb.append(data.appendTo(new StringBuilder(), this, pos).toString().replace(nl, nlIndent));
        pos = pos + data.getSize(this, pos);
      }
    }
    return sb.toString();
  }
Пример #6
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   RawItemProfile<ResolvedJavaType> profile = getRawTypeProfile(data, pos);
   TriState nullSeen = getNullSeen(data, pos);
   TriState exceptionSeen = getExceptionSeen(data, pos);
   sb.append(
       format(
           "count(%d) null_seen(%s) exception_seen(%s) nonprofiled_count(%d) entries(%d)",
           getCounterValue(data, pos),
           nullSeen,
           exceptionSeen,
           getTypesNotRecordedExecutionCount(data, pos),
           profile.entries));
   for (int i = 0; i < profile.entries; i++) {
     long count = profile.counts[i];
     sb.append(
         format(
             "%n  %s (%d, %4.2f)",
             profile.items[i].toJavaName(), count, (double) count / profile.totalCount));
   }
   return sb;
 }
Пример #7
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   long taken = data.readUnsignedInt(pos, TAKEN_COUNT_OFFSET);
   long notTaken = data.readUnsignedInt(pos, NOT_TAKEN_COUNT_OFFSET);
   double takenProbability = getBranchTakenProbability(data, pos);
   return sb.append(
       format(
           "taken(%d, %4.2f) not_taken(%d, %4.2f) displacement(%d)",
           taken,
           takenProbability,
           notTaken,
           1.0D - takenProbability,
           getTakenDisplacement(data, pos)));
 }
Пример #8
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   return sb.append(format("length(%d)", getLength(data, pos)));
 }
Пример #9
0
 @Override
 public StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos) {
   return sb.append(format("exception_seen(%s)", getExceptionSeen(data, pos)));
 }