Mercurial > hg > graal-compiler
changeset 22660:6d7173d9e720
consistently use HotSpotVMConfig.config() for static access to the HotSpotVMConfig instance
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 18 Sep 2015 15:05:31 +0200 |
parents | 5d9dbda5a74a |
children | 784ba407d663 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java |
diffstat | 2 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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);