Mercurial > hg > graal-compiler
changeset 23190:90de09b99c79
Implement TruffleRuntime#isProfilingEnabled; Add flag to enable/disable Truffle profiling in GraalTruffleRuntime (-G:-TruffleProfilingEnabled).
author | Christian Humer <christian.humer@oracle.com> |
---|---|
date | Wed, 16 Dec 2015 16:55:17 +0100 |
parents | d223936249bd |
children | c73162067fef |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java mx.graal/suite.py |
diffstat | 4 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java Wed Dec 16 14:22:19 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java Wed Dec 16 16:55:17 2015 +0100 @@ -453,6 +453,13 @@ return callMethods; } + // cached field access to make it fast in the interpreter + private static final boolean PROFILING_ENABLED = TruffleCompilerOptions.TruffleProfilingEnabled.getValue(); + + public final boolean isProfilingEnabled() { + return PROFILING_ENABLED; + } + private final class DispatchTruffleCompilationListener implements GraalTruffleCompilationListener { public void notifyCompilationQueued(OptimizedCallTarget target) {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Wed Dec 16 14:22:19 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Wed Dec 16 16:55:17 2015 +0100 @@ -68,8 +68,8 @@ import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.api.profiles.ValueProfile; import com.oracle.truffle.api.utilities.CyclicAssumption; -import com.oracle.truffle.api.utilities.ValueProfile; /** * Call target that is optimized by Graal upon surpassing a specific invocation threshold.
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Wed Dec 16 14:22:19 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Wed Dec 16 16:55:17 2015 +0100 @@ -186,5 +186,8 @@ @Option(help = "Enable support for simple infopoints in truffle partial evaluations.", type = OptionType.Debug) public static final OptionValue<Boolean> TruffleIterativePartialEscape = new OptionValue<>(false); + @Option(help = "Enable/disable builtin profiles in com.oracle.truffle.api.profiles.", type = OptionType.Debug) + public static final OptionValue<Boolean> TruffleProfilingEnabled = new OptionValue<>(true); + // @formatter:on }
--- a/mx.graal/suite.py Wed Dec 16 14:22:19 2015 +0100 +++ b/mx.graal/suite.py Wed Dec 16 16:55:17 2015 +0100 @@ -47,7 +47,7 @@ }, { "name" : "truffle", - "version" : "66f79c26f8977bb7eb246b70d90b39385f846be7", + "version" : "a63bda98cfdb007bed595e776dff9081b3c0162a", "urls" : [ {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/truffle", "kind" : "hg"}, {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},