Mercurial > hg > truffle
changeset 17420:e98150919577
Truffle: cleanup compilation profile fields.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 13 Oct 2014 17:44:15 +0200 |
parents | 83c3dd41ca64 |
children | 87ea195b66ff |
files | graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CompilationProfile.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TraceCompilationProfile.java |
diffstat | 4 files changed, 9 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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<String, Object> 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);
--- 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(); } }
--- 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++;