< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalOptionValues.java

Print this page

        

*** 38,50 **** import org.graalvm.compiler.options.OptionKey; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.options.OptionsParser; import jdk.vm.ci.common.InitTimer; /** ! * The {@link #HOTSPOT_OPTIONS} value contains the options values initialized in a HotSpot VM. The * values are set via system properties with the {@value #GRAAL_OPTION_PROPERTY_PREFIX} prefix. */ public class HotSpotGraalOptionValues { /** --- 38,51 ---- import org.graalvm.compiler.options.OptionKey; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.options.OptionsParser; import jdk.vm.ci.common.InitTimer; + import jdk.vm.ci.common.NativeImageReinitialize; /** ! * The {@link #defaultOptions()} method returns the options values initialized in a HotSpot VM. The * values are set via system properties with the {@value #GRAAL_OPTION_PROPERTY_PREFIX} prefix. */ public class HotSpotGraalOptionValues { /**
*** 69,79 **** */ public static String asSystemPropertySetting(OptionValues options, OptionKey<?> value) { return GRAAL_OPTION_PROPERTY_PREFIX + value.getName() + "=" + value.getValue(options); } ! public static final OptionValues HOTSPOT_OPTIONS = initializeOptions(); /** * Global options. The values for these options are initialized by parsing the file denoted by * the {@code VM.getSavedProperty(String) saved} system property named * {@value #GRAAL_OPTIONS_FILE_PROPERTY_NAME} if the file exists followed by parsing the options --- 70,94 ---- */ public static String asSystemPropertySetting(OptionValues options, OptionKey<?> value) { return GRAAL_OPTION_PROPERTY_PREFIX + value.getName() + "=" + value.getValue(options); } ! @NativeImageReinitialize private static volatile OptionValues hotspotOptions; ! ! public static OptionValues defaultOptions() { ! OptionValues res = hotspotOptions; ! if (res == null) { ! synchronized (HotSpotGraalOptionValues.class) { ! res = hotspotOptions; ! if (res == null) { ! res = initializeOptions(); ! hotspotOptions = res; ! } ! } ! } ! return res; ! } /** * Global options. The values for these options are initialized by parsing the file denoted by * the {@code VM.getSavedProperty(String) saved} system property named * {@value #GRAAL_OPTIONS_FILE_PROPERTY_NAME} if the file exists followed by parsing the options
< prev index next >