8192857: LogCompilation could show the intrinsics more like +PrintIntrinsics
Summary: Show the intrinsics internal name in the inlining output
Reviewed-by: kvn, gtriantafill
--- a/src/utils/LogCompilation/src/main/java/com/sun/hotspot/tools/compiler/CallSite.java Mon Jan 08 12:02:48 2018 -0500
+++ b/src/utils/LogCompilation/src/main/java/com/sun/hotspot/tools/compiler/CallSite.java Mon Jan 08 17:47:08 2018 -0500
@@ -105,6 +105,11 @@
private List<UncommonTrap> traps;
/**
+ * The name of the intrinsic at this call site.
+ */
+ private String intrinsicName;
+
+ /**
* Default constructor: used to create an instance that represents the top
* scope of a compilation.
*/
@@ -179,6 +184,7 @@
} else {
stream.print(" @ " + getBci() + " " + m + " " + getReason());
}
+ stream.print(getIntrinsicOrEmptyString());
stream.printf(" (end time: %6.4f", getTimeStamp());
if (getEndNodes() > 0) {
stream.printf(" nodes: %d live: %d", getEndNodes(), getEndLiveNodes());
@@ -368,4 +374,19 @@
public void setInlineId(long inlineId) {
this.inlineId = inlineId;
}
+
+ public String getIntrinsicName() {
+ return intrinsicName;
+ }
+
+ public void setIntrinsicName(String name) {
+ this.intrinsicName = name;
+ }
+
+ public String getIntrinsicOrEmptyString() {
+ if (intrinsicName != null) {
+ return " (intrinsic: " + getIntrinsicName() + ")";
+ }
+ return "";
+ }
}
--- a/src/utils/LogCompilation/src/main/java/com/sun/hotspot/tools/compiler/LogParser.java Mon Jan 08 12:02:48 2018 -0500
+++ b/src/utils/LogCompilation/src/main/java/com/sun/hotspot/tools/compiler/LogParser.java Mon Jan 08 17:47:08 2018 -0500
@@ -975,6 +975,12 @@
// track of it but don't add it to the list yet.
methodHandleSite = site;
}
+ } else if (qname.equals("intrinsic")) {
+ String id = atts.getValue("id");
+ assert id != null : "intrinsic id is null";
+ CallSite cs = (site != null) ? site : scopes.peek();
+ assert cs != null : "no CallSite?";
+ cs.setIntrinsicName(id);
} else if (qname.equals("regalloc")) {
compile.setAttempts(Integer.parseInt(search(atts, "attempts")));
} else if (qname.equals("inline_fail")) {