89 for (int i = 0; i < indent; i++) {
90 stream.print(' ');
91 }
92 }
93 private static boolean compat = true;
94
95 public void print(PrintStream stream, int indent) {
96 emit(stream, indent);
97 String m = getMethod().getHolder().replace('/', '.') + "::" + getMethod().getName();
98 if (getReason() == null) {
99 stream.print(" @ " + getBci() + " " + m + " (" + getMethod().getBytes() + " bytes)");
100
101 } else {
102 if (isCompat()) {
103 stream.print(" @ " + getBci() + " " + m + " " + getReason());
104 } else {
105 stream.print("- @ " + getBci() + " " + m +
106 " (" + getMethod().getBytes() + " bytes) " + getReason());
107 }
108 }
109 if (getEndNodes() > 0) {
110 stream.printf(" (end time: %6.4f nodes: %d live: %d)", getTimeStamp(), getEndNodes(), getEndLiveNodes());
111 }
112 stream.println("");
113 if (getReceiver() != null) {
114 emit(stream, indent + 4);
115 // stream.println("type profile " + method.holder + " -> " + receiver + " (" +
116 // receiver_count + "/" + count + "," + (receiver_count * 100 / count) + "%)");
117 stream.println("type profile " + getMethod().getHolder() + " -> " + getReceiver() + " (" +
118 (getReceiverCount() * 100 / getCount()) + "%)");
119 }
120 if (getCalls() != null) {
121 for (CallSite site : getCalls()) {
122 site.print(stream, indent + 2);
123 }
124 }
125 }
126
127 public int getBci() {
128 return bci;
129 }
130
131 public void setBci(int bci) {
132 this.bci = bci;
|
89 for (int i = 0; i < indent; i++) {
90 stream.print(' ');
91 }
92 }
93 private static boolean compat = true;
94
95 public void print(PrintStream stream, int indent) {
96 emit(stream, indent);
97 String m = getMethod().getHolder().replace('/', '.') + "::" + getMethod().getName();
98 if (getReason() == null) {
99 stream.print(" @ " + getBci() + " " + m + " (" + getMethod().getBytes() + " bytes)");
100
101 } else {
102 if (isCompat()) {
103 stream.print(" @ " + getBci() + " " + m + " " + getReason());
104 } else {
105 stream.print("- @ " + getBci() + " " + m +
106 " (" + getMethod().getBytes() + " bytes) " + getReason());
107 }
108 }
109 stream.printf(" (end time: %6.4f", getTimeStamp());
110 if (getEndNodes() > 0) {
111 stream.printf(" nodes: %d live: %d", getEndNodes(), getEndLiveNodes());
112 }
113 stream.println(")");
114
115 if (getReceiver() != null) {
116 emit(stream, indent + 4);
117 // stream.println("type profile " + method.holder + " -> " + receiver + " (" +
118 // receiver_count + "/" + count + "," + (receiver_count * 100 / count) + "%)");
119 stream.println("type profile " + getMethod().getHolder() + " -> " + getReceiver() + " (" +
120 (getReceiverCount() * 100 / getCount()) + "%)");
121 }
122 if (getCalls() != null) {
123 for (CallSite site : getCalls()) {
124 site.print(stream, indent + 2);
125 }
126 }
127 }
128
129 public int getBci() {
130 return bci;
131 }
132
133 public void setBci(int bci) {
134 this.bci = bci;
|