Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java @ 22758:a130b51efb07
removed @Option mechanism from JVMCI (GRAAL-1371)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 21 Dec 2015 15:53:56 +0100 |
parents | 57646377e480 |
children | f2206f5bb62e |
comparison
equal
deleted
inserted
replaced
22757:f4c4cc22a31c | 22758:a130b51efb07 |
---|---|
34 import java.util.HashMap; | 34 import java.util.HashMap; |
35 import java.util.Map; | 35 import java.util.Map; |
36 import java.util.Objects; | 36 import java.util.Objects; |
37 import java.util.TreeMap; | 37 import java.util.TreeMap; |
38 | 38 |
39 import sun.misc.VM; | |
39 import jdk.vm.ci.code.Architecture; | 40 import jdk.vm.ci.code.Architecture; |
40 import jdk.vm.ci.code.CompilationResult; | 41 import jdk.vm.ci.code.CompilationResult; |
41 import jdk.vm.ci.code.InstalledCode; | 42 import jdk.vm.ci.code.InstalledCode; |
42 import jdk.vm.ci.common.JVMCIError; | 43 import jdk.vm.ci.common.JVMCIError; |
43 import jdk.vm.ci.inittimer.InitTimer; | 44 import jdk.vm.ci.inittimer.InitTimer; |
81 public static HotSpotJVMCIRuntime runtime() { | 82 public static HotSpotJVMCIRuntime runtime() { |
82 JVMCI.initialize(); | 83 JVMCI.initialize(); |
83 return DelayedInit.instance; | 84 return DelayedInit.instance; |
84 } | 85 } |
85 | 86 |
87 /** | |
88 * Gets a boolean value based on a {@linkplain VM#getSavedProperty(String) saved} system | |
89 * property. | |
90 * | |
91 * @param name the name of the system property to derive a boolean value from using | |
92 * {@link Boolean#parseBoolean(String)} | |
93 * @param def the value to return if there is no system property corresponding to {@code name} | |
94 */ | |
95 public static boolean getBooleanOption(String name, boolean def) { | |
96 String value = VM.getSavedProperty(name); | |
97 if (value == null) { | |
98 return def; | |
99 } | |
100 return Boolean.parseBoolean(value); | |
101 } | |
102 | |
86 public static HotSpotJVMCIBackendFactory findFactory(String architecture) { | 103 public static HotSpotJVMCIBackendFactory findFactory(String architecture) { |
87 for (HotSpotJVMCIBackendFactory factory : Services.load(HotSpotJVMCIBackendFactory.class)) { | 104 for (HotSpotJVMCIBackendFactory factory : Services.load(HotSpotJVMCIBackendFactory.class)) { |
88 if (factory.getArchitecture().equalsIgnoreCase(architecture)) { | 105 if (factory.getArchitecture().equalsIgnoreCase(architecture)) { |
89 return factory; | 106 return factory; |
90 } | 107 } |