# HG changeset patch # User Doug Simon # Date 1442581531 -7200 # Node ID 6d7173d9e720163a0612c5e6fd1d310430ca1389 # Parent 5d9dbda5a74a4444c44c9fe620f414d09cf4c1b1 consistently use HotSpotVMConfig.config() for static access to the HotSpotVMConfig instance diff -r 5d9dbda5a74a -r 6d7173d9e720 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Fri Sep 18 15:10:05 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Fri Sep 18 15:05:31 2015 +0200 @@ -139,7 +139,7 @@ @Fold public static HotSpotVMConfig config() { - return runtime().getConfig(); + return HotSpotVMConfig.config(); } @Fold diff -r 5d9dbda5a74a -r 6d7173d9e720 graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java --- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Fri Sep 18 15:10:05 2015 +0200 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Fri Sep 18 15:05:31 2015 +0200 @@ -31,6 +31,7 @@ import static com.oracle.graal.truffle.TruffleCompilerOptions.TruffleCompilationExceptionsAreThrown; import static com.oracle.graal.truffle.hotspot.UnsafeAccess.UNSAFE; import static jdk.internal.jvmci.code.CodeUtil.getCallingConvention; +import static jdk.internal.jvmci.hotspot.HotSpotVMConfig.config; import java.util.Arrays; import java.util.Collection; @@ -223,7 +224,7 @@ private static CompilationResultBuilderFactory getOptimizedCallTargetInstrumentationFactory(String arch) { for (OptimizedCallTargetInstrumentationFactory factory : Services.load(OptimizedCallTargetInstrumentationFactory.class)) { if (factory.getArchitecture().equals(arch)) { - factory.init(getJVMCIRuntime().getConfig(), getHotSpotProviders().getRegisters()); + factory.init(config(), getHotSpotProviders().getRegisters()); return factory; } } @@ -257,10 +258,6 @@ return (HotSpotBackend) runtimeProvider.getHostBackend(); } - private static HotSpotJVMCIRuntimeProvider getJVMCIRuntime() { - return HotSpotJVMCIRuntime.runtime(); - } - private static HotSpotProviders getHotSpotProviders() { return getHotSpotBackend().getProviders(); } @@ -392,7 +389,7 @@ } public static NativeFunctionInterface createNativeFunctionInterface() { - HotSpotVMConfig config = getJVMCIRuntime().getConfig(); + HotSpotVMConfig config = config(); Backend backend = getHotSpotBackend(); RawNativeCallNodeFactory factory = getRawNativeCallNodeFactory(backend.getTarget().arch.getName()); if (factory == null) { @@ -414,7 +411,7 @@ static void traceTransferToInterpreter() { long thread = UNSAFE.getLong(Thread.currentThread(), THREAD_EETOP_OFFSET); - long pendingTransferToInterpreterAddress = thread + getJVMCIRuntime().getConfig().pendingTransferToInterpreterOffset; + long pendingTransferToInterpreterAddress = thread + config().pendingTransferToInterpreterOffset; boolean deoptimized = UNSAFE.getByte(pendingTransferToInterpreterAddress) != 0; if (deoptimized) { UNSAFE.putByte(pendingTransferToInterpreterAddress, (byte) 0);