src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/CallSite.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/CallSite.java
src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/CallSite.java
Print this page
rev 6133 : 8005079: fix LogCompilation for incremental inlining
Summary: report late inlining as part of the rest of the inlining output
Reviewed-by:
rev 6134 : imported patch logcompilation-reviews
*** 23,32 ****
--- 23,33 ----
*/
package com.sun.hotspot.tools.compiler;
import java.io.PrintStream;
+ import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;
public class CallSite {
*** 38,47 ****
--- 39,49 ----
private String reason;
private List<CallSite> calls;
private int endNodes;
private int endLiveNodes;
private double timeStamp;
+ private long inlineId;
CallSite() {
}
CallSite(int bci, Method m) {
*** 92,102 ****
}
private static boolean compat = true;
public void print(PrintStream stream, int indent) {
emit(stream, indent);
! String m = getMethod().getHolder().replace('/', '.') + "::" + getMethod().getName();
if (getReason() == null) {
stream.print(" @ " + getBci() + " " + m + " (" + getMethod().getBytes() + " bytes)");
} else {
if (isCompat()) {
--- 94,104 ----
}
private static boolean compat = true;
public void print(PrintStream stream, int indent) {
emit(stream, indent);
! String m = getMethod().getHolder() + "::" + getMethod().getName();
if (getReason() == null) {
stream.print(" @ " + getBci() + " " + m + " (" + getMethod().getBytes() + " bytes)");
} else {
if (isCompat()) {
*** 212,217 ****
--- 214,260 ----
public double getTimeStamp() {
return timeStamp;
}
+ private boolean matches(CallSite other) {
+ // Every late inline call site has a unique inline id. If the
+ // call site we're looking for has one then use it other rely
+ // on method name and bci.
+ if (other.inlineId != 0) {
+ return inlineId == other.inlineId;
+ }
+ return method.equals(other.method) && bci == other.bci;
+ }
+
+ public CallSite findCallSite(ArrayDeque<CallSite> sites) {
+ // Locate a late inline call site. Multiple chains of
+ // identical call sites with the same method name/bci are
+ // possible so we have to try them all until we find the late
+ // inline call site that has a matching inline id.
+ CallSite site = sites.pop();
+ for (CallSite c : calls) {
+ if (c.matches(site)) {
+ if (!sites.isEmpty()) {
+ CallSite res = c.findCallSite(sites);
+ if (res != null) {
+ sites.push(site);
+ return res;
+ }
+ } else {
+ sites.push(site);
+ return c;
+ }
+ }
+ }
+ sites.push(site);
+ return null;
+ }
+
+ public long getInlineId() {
+ return inlineId;
+ }
+
+ public void setInlineId(long inlineId) {
+ this.inlineId = inlineId;
+ }
}
src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/CallSite.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File