use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class GraalOSRLockTest method testLockOSRRecursive.
@Test
@SuppressWarnings("try")
public void testLockOSRRecursive() {
run(() -> {
// call it
testRecursiveLockingLeaf();
ResolvedJavaMethod leaf = getResolvedJavaMethod("testRecursiveLockingLeaf");
// profile it
leaf.reprofile();
testRecursiveLockingLeaf();
EconomicMap<OptionKey<?>, Object> overrides = osrLockNoDeopt();
overrides.put(HighTier.Options.Inline, false);
OptionValues options = new OptionValues(getInitialOptions(), overrides);
DebugContext debug = getDebugContext(options);
compile(debug, leaf, -1);
testOSR(options, "testRecursiveLockingRoot");
});
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class GraalOSRLockTest method testLockOSROuterImmediateDeoptAfter.
// @Test
@SuppressWarnings("try")
public void testLockOSROuterImmediateDeoptAfter() {
run(() -> {
OptionValues options = new OptionValues(getInitialOptions(), osrLockDeopt());
testOSR(options, "testOuterLockImmediateDeoptAfter");
});
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class GraalOSRLockTest method testLockOSRRecursiveLeafOSR.
@Test
@SuppressWarnings("try")
public void testLockOSRRecursiveLeafOSR() {
run(() -> {
testRecursiveRootNoOSR();
ResolvedJavaMethod root = getResolvedJavaMethod("testRecursiveRootNoOSR");
EconomicMap<OptionKey<?>, Object> overrides = osrLockNoDeopt();
overrides.put(HighTier.Options.Inline, false);
OptionValues options = new OptionValues(getInitialOptions(), overrides);
DebugContext debug = getDebugContext(options);
compile(debug, root, -1);
testOSR(options, "testRecursiveLeafOSR");
// force a safepoint and hope the inflated locks are deflated
System.gc();
// call the root to call into the leaf and enter the osr-ed code
testRecursiveRootNoOSR();
});
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class GraalOSRLockTest method testLockOSROuterInnerLockDepthRecursiveCompileRestOfMethod0.
@Test
@SuppressWarnings("try")
public void testLockOSROuterInnerLockDepthRecursiveCompileRestOfMethod0() {
run(() -> {
OptionValues options = new OptionValues(getInitialOptions(), osrLockNoDeopt());
testOSR(options, "testOuterInnerLockDepth1RecursiveCompileRestOfMethod1");
});
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class CompileTheWorld method loadOptions.
public static OptionValues loadOptions(OptionValues initialValues) {
EconomicMap<OptionKey<?>, Object> values = OptionValues.newOptionMap();
List<OptionDescriptors> loader = singletonList(DESCRIPTORS);
OptionsParser.parseOptions(extractEntries(System.getProperties(), "CompileTheWorld.", true), values, loader);
OptionValues options = new OptionValues(initialValues, values);
if (Options.Help.getValue(options)) {
options.printHelp(loader, System.out, "CompileTheWorld.");
System.exit(0);
}
return options;
}
Aggregations