Mercurial > hg > graal-compiler
changeset 13106:bdc836ef885e
made CITimeEach work for Graal even if CITime is not enabled
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 21 Nov 2013 22:45:08 +0100 |
parents | d3fc35a43376 |
children | 91933915d1d0 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java src/share/vm/graal/graalCompiler.cpp |
diffstat | 3 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Thu Nov 21 22:24:00 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Thu Nov 21 22:45:08 2013 +0100 @@ -200,7 +200,7 @@ System.exit(-1); } } finally { - if (config.ciTime && installedCode != null) { + if ((config.ciTime || config.ciTimeEach) && installedCode != null) { long processedBytes = InlinedBytecodes.getCurrentValue() - previousInlinedBytecodes; long time = CompilationTime.getCurrentValue() - previousCompilationTime; TimeUnit timeUnit = CompilationTime.getTimeUnit();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java Thu Nov 21 22:24:00 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java Thu Nov 21 22:45:08 2013 +0100 @@ -219,10 +219,10 @@ * Called from VM code once all Graal command line options have been processed by * {@link #setOption(String)}. * - * @param ciTime the value of the CITime HotSpot VM option + * @param timeCompilations true if the CITime or CITimeEach HotSpot VM options are set */ - public static void finalizeOptions(boolean ciTime) { - if (ciTime) { + public static void finalizeOptions(boolean timeCompilations) { + if (timeCompilations) { unconditionallyEnableTimerOrMetric(InliningUtil.class, "InlinedBytecodes"); unconditionallyEnableTimerOrMetric(CompilationTask.class, "CompilationTime"); }
--- a/src/share/vm/graal/graalCompiler.cpp Thu Nov 21 22:24:00 2013 +0100 +++ b/src/share/vm/graal/graalCompiler.cpp Thu Nov 21 22:45:08 2013 +0100 @@ -98,7 +98,7 @@ vm_abort(false); } } - VMToCompiler::finalizeOptions(CITime); + VMToCompiler::finalizeOptions(CITime || CITimeEach); if (UseCompiler) { bool bootstrap = GRAALVM_ONLY(BootstrapGraal) NOT_GRAALVM(false);