# HG changeset patch # User Christian Humer # Date 1413215055 -7200 # Node ID e9815091957701d341a79f96a3d0996f17fcf453 # Parent 83c3dd41ca6475122e3e3f2dccb050b33d9e79f1 Truffle: cleanup compilation profile fields. diff -r 83c3dd41ca64 -r e98150919577 graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java --- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Mon Oct 13 16:50:01 2014 +0200 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Mon Oct 13 17:44:15 2014 +0200 @@ -113,8 +113,7 @@ } else { compilationPolicy = new InterpreterOnlyCompilationPolicy(); } - OptimizedCallTarget target = new OptimizedCallTarget(rootNode, this, TruffleMinInvokeThreshold.getValue(), TruffleCompilationThreshold.getValue(), compilationPolicy, - new HotSpotSpeculationLog()); + OptimizedCallTarget target = new OptimizedCallTarget(rootNode, this, compilationPolicy, new HotSpotSpeculationLog()); callTargets.put(target, null); return target; } diff -r 83c3dd41ca64 -r e98150919577 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CompilationProfile.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CompilationProfile.java Mon Oct 13 16:50:01 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CompilationProfile.java Mon Oct 13 17:44:15 2014 +0200 @@ -33,25 +33,14 @@ */ private int invalidationCount; - /** - * Number of times a node was replaced in this tree. - */ - private int nodeReplaceCount; - - private long previousTimestamp; - private int interpreterCallCount; private int interpreterCallAndLoopCount; private int compilationCallThreshold; private int compilationCallAndLoopThreshold; - private final int originalCompilationThreshold; - - public CompilationProfile(final int compilationThreshold, final int initialInvokeCounter) { - this.previousTimestamp = System.nanoTime(); - this.compilationCallThreshold = initialInvokeCounter; - this.compilationCallAndLoopThreshold = compilationThreshold; - this.originalCompilationThreshold = compilationThreshold; + public CompilationProfile() { + this.compilationCallThreshold = TruffleMinInvokeThreshold.getValue(); + this.compilationCallAndLoopThreshold = TruffleCompilationThreshold.getValue(); } @Override @@ -64,25 +53,17 @@ Map properties = new LinkedHashMap<>(); String callsThreshold = String.format("%7d/%5d", getInterpreterCallCount(), getCompilationCallThreshold()); String loopsThreshold = String.format("%7d/%5d", getInterpreterCallAndLoopCount(), getCompilationCallAndLoopThreshold()); - String invalidationReplace = String.format("%5d/%5d", invalidationCount, nodeReplaceCount); + String invalidations = String.format("%5d", invalidationCount); properties.put("C/T", callsThreshold); properties.put("L/T", loopsThreshold); - properties.put("Inval#/Replace#", invalidationReplace); + properties.put("Inval#", invalidations); return properties; } - public long getPreviousTimestamp() { - return previousTimestamp; - } - public int getInvalidationCount() { return invalidationCount; } - public int getNodeReplaceCount() { - return nodeReplaceCount; - } - public int getInterpreterCallAndLoopCount() { return interpreterCallAndLoopCount; } @@ -111,11 +92,6 @@ } } - void reportTiminingFailed(long timestamp) { - ensureProfiling(0, originalCompilationThreshold); - this.previousTimestamp = timestamp; - } - public void reportInvalidated() { invalidationCount++; int reprofile = TruffleInvalidationReprofileCount.getValue(); @@ -144,7 +120,6 @@ } void reportNodeReplaced() { - nodeReplaceCount++; // delay compilation until tree is deemed stable enough int replaceBackoff = TruffleReplaceReprofileCount.getValue(); ensureProfiling(1, replaceBackoff); diff -r 83c3dd41ca64 -r e98150919577 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Mon Oct 13 16:50:01 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Mon Oct 13 17:44:15 2014 +0200 @@ -72,7 +72,7 @@ return rootNode; } - public OptimizedCallTarget(RootNode rootNode, GraalTruffleRuntime runtime, int invokeCounter, int compilationThreshold, CompilationPolicy compilationPolicy, SpeculationLog speculationLog) { + public OptimizedCallTarget(RootNode rootNode, GraalTruffleRuntime runtime, CompilationPolicy compilationPolicy, SpeculationLog speculationLog) { super(rootNode.toString()); this.runtime = runtime; this.speculationLog = speculationLog; @@ -81,9 +81,9 @@ this.rootNode.setCallTarget(this); this.compilationPolicy = compilationPolicy; if (TruffleCallTargetProfiling.getValue()) { - this.compilationProfile = new TraceCompilationProfile(compilationThreshold, invokeCounter); + this.compilationProfile = new TraceCompilationProfile(); } else { - this.compilationProfile = new CompilationProfile(compilationThreshold, invokeCounter); + this.compilationProfile = new CompilationProfile(); } } diff -r 83c3dd41ca64 -r e98150919577 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TraceCompilationProfile.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TraceCompilationProfile.java Mon Oct 13 16:50:01 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TraceCompilationProfile.java Mon Oct 13 17:44:15 2014 +0200 @@ -28,10 +28,6 @@ private int indirectCallCount; private int inlinedCallCount; - public TraceCompilationProfile(int compilationThreshold, int initialInvokeCounter) { - super(compilationThreshold, initialInvokeCounter); - } - @Override public void reportIndirectCall() { indirectCallCount++;