< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalOptionValues.java
Print this page
*** 39,48 ****
--- 39,49 ----
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.options.OptionsParser;
import jdk.vm.ci.common.InitTimer;
import jdk.vm.ci.common.NativeImageReinitialize;
+ import jdk.vm.ci.services.Services;
/**
* 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.
*/
*** 87,105 ****
}
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
! * encoded in saved system properties whose names start with
! * {@value #GRAAL_OPTION_PROPERTY_PREFIX}. Key/value pairs are parsed from the aforementioned
! * file with {@link Properties#load(java.io.Reader)}.
*/
@SuppressWarnings("try")
! private static OptionValues initializeOptions() {
EconomicMap<OptionKey<?>, Object> values = OptionValues.newOptionMap();
try (InitTimer t = timer("InitializeOptions")) {
Iterable<OptionDescriptors> loader = OptionsParser.getOptionsLoader();
Map<String, String> savedProps = jdk.vm.ci.services.Services.getSavedProperties();
--- 88,105 ----
}
return res;
}
/**
! * Gets and parses options based on {@linkplain Services#getSavedProperties() saved system
! * properties}. The values for these options are initialized by parsing the file denoted by the
! * {@value #GRAAL_OPTIONS_FILE_PROPERTY_NAME} property followed by parsing the options encoded
! * in properties whose names start with {@value #GRAAL_OPTION_PROPERTY_PREFIX}. Key/value pairs
! * are parsed from the aforementioned file with {@link Properties#load(java.io.Reader)}.
*/
@SuppressWarnings("try")
! public static EconomicMap<OptionKey<?>, Object> parseOptions() {
EconomicMap<OptionKey<?>, Object> values = OptionValues.newOptionMap();
try (InitTimer t = timer("InitializeOptions")) {
Iterable<OptionDescriptors> loader = OptionsParser.getOptionsLoader();
Map<String, String> savedProps = jdk.vm.ci.services.Services.getSavedProperties();
*** 140,148 ****
}
}
}
OptionsParser.parseOptions(optionSettings, values, loader);
! return new OptionValues(values);
}
}
}
--- 140,158 ----
}
}
}
OptionsParser.parseOptions(optionSettings, values, loader);
! return values;
}
}
+
+ /**
+ * Substituted by
+ * {@code com.oracle.svm.graal.hotspot.libgraal.Target_org_graalvm_compiler_hotspot_HotSpotGraalOptionValues}
+ * to update {@code com.oracle.svm.core.option.RuntimeOptionValues.singleton()} instead of
+ * creating a new {@link OptionValues} object.
+ */
+ private static OptionValues initializeOptions() {
+ return new OptionValues(parseOptions());
+ }
}
< prev index next >