# HG changeset patch # User Gilles Duboscq # Date 1394992016 -3600 # Node ID bf7d914b8ef77f8a2d66f07b1fe86c03455037b3 # Parent b6aa8c4972aa3fafae4b272a6ba1d4fa8c98dfec Print compilation level in Graal's PrintCompilation output diff -r b6aa8c4972aa -r bf7d914b8ef7 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Sun Mar 16 18:36:51 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Sun Mar 16 18:46:56 2014 +0100 @@ -336,8 +336,20 @@ if (HotSpotCIPrintCompilerName.getValue()) { compilerName = "Graal:"; } - TTY.println(String.format("%s%7d %4d %c%c%c%c%c %s %s(%d bytes)", compilerName, (System.currentTimeMillis() - TIMESTAMP_START), id, isOSR ? '%' : ' ', Modifier.isSynchronized(mod) ? 's' - : ' ', ' ', ' ', Modifier.isNative(mod) ? 'n' : ' ', MetaUtil.format("%H::%n(%p)", method), isOSR ? "@ " + entryBCI + " " : "", method.getCodeSize())); + HotSpotVMConfig config = backend.getRuntime().getConfig(); + int compLevel = config.compilationLevelFullOptimization; + char compLevelChar; + if (config.tieredCompilation) { + compLevelChar = '-'; + if (compLevel != -1) { + compLevelChar = (char) ('0' + compLevel); + } + } else { + compLevelChar = ' '; + } + TTY.println(String.format("%s%7d %4d %c%c%c%c%c%c %s %s(%d bytes)", compilerName, (System.currentTimeMillis() - TIMESTAMP_START), id, isOSR ? '%' : ' ', + Modifier.isSynchronized(mod) ? 's' : ' ', ' ', ' ', Modifier.isNative(mod) ? 'n' : ' ', compLevelChar, MetaUtil.format("%H::%n(%p)", method), isOSR ? "@ " + entryBCI + " " + : "", method.getCodeSize())); } private HotSpotInstalledCode installMethod(final CompilationResult compResult) { diff -r b6aa8c4972aa -r bf7d914b8ef7 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Sun Mar 16 18:36:51 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Sun Mar 16 18:46:56 2014 +0100 @@ -714,6 +714,7 @@ @HotSpotVMFlag(name = "GraalUseFastLocking") @Stable public boolean useFastLocking; @HotSpotVMFlag(name = "ForceUnreachable") @Stable public boolean forceUnreachable; @HotSpotVMFlag(name = "GPUOffload") @Stable public boolean gpuOffload; + @HotSpotVMFlag(name = "TieredCompilation") @Stable public boolean tieredCompilation; @HotSpotVMFlag(name = "UseTLAB") @Stable public boolean useTLAB; @HotSpotVMFlag(name = "UseBiasedLocking") @Stable public boolean useBiasedLocking;