Mercurial > hg > graal-compiler
changeset 14551:bf7d914b8ef7
Print compilation level in Graal's PrintCompilation output
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Sun, 16 Mar 2014 18:46:56 +0100 |
parents | b6aa8c4972aa |
children | 2c78ee2a890f |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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;