Mercurial > hg > graal-compiler
changeset 9920:44fcf49b746f
fixed class initialization ordering issue; HotSpotOptions.<clinit> must not trigger initialization of other classes that depend on the effect of option setting in their <clinit>
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 07 Jun 2013 10:52:48 +0200 |
parents | af909f4b80a9 |
children | 81b298e0868b 2a091d2987bd 8448a4e15f95 5f2ab1ec1a87 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java make/build-graal.xml |
diffstat | 3 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Thu Jun 06 23:16:45 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Fri Jun 07 10:52:48 2013 +0200 @@ -35,20 +35,15 @@ import com.oracle.graal.compiler.*; import com.oracle.graal.debug.*; import com.oracle.graal.debug.internal.*; +import com.oracle.graal.hotspot.bridge.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; -import com.oracle.graal.options.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.*; public final class CompilationTask implements Runnable, Comparable<CompilationTask> { - //@formatter:off - @Option(help = "") - public static final OptionValue<Integer> SlowQueueCutoff = new OptionValue<>(100000); - //@formatter:on - public static final ThreadLocal<Boolean> withinEnqueue = new ThreadLocal<Boolean>() { @Override @@ -116,7 +111,7 @@ } inProgress = true; if (DynamicCompilePriority.getValue()) { - int threadPriority = priority < SlowQueueCutoff.getValue() ? Thread.NORM_PRIORITY : Thread.MIN_PRIORITY; + int threadPriority = priority < VMToCompilerImpl.SlowQueueCutoff.getValue() ? Thread.NORM_PRIORITY : Thread.MIN_PRIORITY; if (Thread.currentThread().getPriority() != threadPriority) { Thread.currentThread().setPriority(threadPriority); }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Thu Jun 06 23:16:45 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Fri Jun 07 10:52:48 2013 +0200 @@ -73,6 +73,9 @@ @Option(help = "Print compilation queue activity periodically") private static final OptionValue<Boolean> PrintQueue = new OptionValue<>(false); + @Option(help = "") + public static final OptionValue<Integer> SlowQueueCutoff = new OptionValue<>(100000); + @Option(help = "Time limit in milliseconds for bootstrap (-1 for no limit)") private static final OptionValue<Integer> TimedBootstrap = new OptionValue<>(-1); @@ -177,7 +180,6 @@ } if (DebugEnabled.getValue()) { - Debug.enable(); DebugEnvironment.initialize(log); }
--- a/make/build-graal.xml Thu Jun 06 23:16:45 2013 +0200 +++ b/make/build-graal.xml Fri Jun 07 10:52:48 2013 +0200 @@ -84,7 +84,6 @@ <service type="com.oracle.graal.options.Options"> <provider classname="com.oracle.graal.compiler.GraalCompiler_Options"/> <provider classname="com.oracle.graal.compiler.GraalDebugConfig_Options"/> - <provider classname="com.oracle.graal.hotspot.CompilationTask_Options"/> <provider classname="com.oracle.graal.hotspot.HotSpotGraalRuntime_Options"/> <provider classname="com.oracle.graal.hotspot.bridge.VMToCompilerImpl_Options"/> <provider classname="com.oracle.graal.phases.GraalOptions_Options"/>