< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java

Print this page

        

*** 387,397 **** * Gets a {@link DebugContext} object corresponding to {@code options}, creating a new one if * none currently exists. Debug contexts created by this method will have their * {@link DebugDumpHandler}s closed in {@link #afterTest()}. */ protected DebugContext getDebugContext() { ! return getDebugContext(getInitialOptions()); } @Override protected Collection<DebugHandlersFactory> getDebugHandlersFactories() { return Collections.singletonList(new GraalDebugHandlersFactory(getSnippetReflection())); --- 387,397 ---- * Gets a {@link DebugContext} object corresponding to {@code options}, creating a new one if * none currently exists. Debug contexts created by this method will have their * {@link DebugDumpHandler}s closed in {@link #afterTest()}. */ protected DebugContext getDebugContext() { ! return getDebugContext(getInitialOptions(), null, null); } @Override protected Collection<DebugHandlersFactory> getDebugHandlersFactories() { return Collections.singletonList(new GraalDebugHandlersFactory(getSnippetReflection()));
*** 860,870 **** deoptCounts.put(reason, profile.getDeoptimizationCount(reason)); } Result actual = executeActual(options, method, receiver, args); profile = method.getProfilingInfo(); // profile can change after execution for (DeoptimizationReason reason : shouldNotDeopt) { ! Assert.assertEquals((int) deoptCounts.get(reason), profile.getDeoptimizationCount(reason)); } return actual; } protected void assertEquals(Result expect, Result actual) { --- 860,870 ---- deoptCounts.put(reason, profile.getDeoptimizationCount(reason)); } Result actual = executeActual(options, method, receiver, args); profile = method.getProfilingInfo(); // profile can change after execution for (DeoptimizationReason reason : shouldNotDeopt) { ! Assert.assertEquals("wrong number of deopt counts for " + reason, (int) deoptCounts.get(reason), profile.getDeoptimizationCount(reason)); } return actual; } protected void assertEquals(Result expect, Result actual) {
*** 1214,1241 **** return new Builder(options, debug, allowAssumptions).method(method).compilationId(getCompilationId(method)); } protected final Builder builder(ResolvedJavaMethod method, AllowAssumptions allowAssumptions) { OptionValues options = getInitialOptions(); ! return new Builder(options, getDebugContext(options), allowAssumptions).method(method).compilationId(getCompilationId(method)); } protected final Builder builder(ResolvedJavaMethod method, AllowAssumptions allowAssumptions, CompilationIdentifier compilationId, OptionValues options) { ! return new Builder(options, getDebugContext(options), allowAssumptions).method(method).compilationId(compilationId); } protected final Builder builder(ResolvedJavaMethod method, AllowAssumptions allowAssumptions, OptionValues options) { ! return new Builder(options, getDebugContext(options), allowAssumptions).method(method).compilationId(getCompilationId(method)); } protected PhaseSuite<HighTierContext> getDebugGraphBuilderSuite() { return getCustomGraphBuilderSuite(GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withFullInfopoints(true)); } @SuppressWarnings("try") protected StructuredGraph parse(StructuredGraph.Builder builder, PhaseSuite<HighTierContext> graphBuilderSuite) { ResolvedJavaMethod javaMethod = builder.getMethod(); if (builder.getCancellable() == null) { builder.cancellable(getCancellable(javaMethod)); } assert javaMethod.getAnnotation(Test.class) == null : "shouldn't parse method with @Test annotation: " + javaMethod; StructuredGraph graph = builder.build(); --- 1214,1242 ---- return new Builder(options, debug, allowAssumptions).method(method).compilationId(getCompilationId(method)); } protected final Builder builder(ResolvedJavaMethod method, AllowAssumptions allowAssumptions) { OptionValues options = getInitialOptions(); ! return new Builder(options, getDebugContext(options, null, method), allowAssumptions).method(method).compilationId(getCompilationId(method)); } protected final Builder builder(ResolvedJavaMethod method, AllowAssumptions allowAssumptions, CompilationIdentifier compilationId, OptionValues options) { ! return new Builder(options, getDebugContext(options, compilationId.toString(CompilationIdentifier.Verbosity.ID), method), allowAssumptions).method(method).compilationId(compilationId); } protected final Builder builder(ResolvedJavaMethod method, AllowAssumptions allowAssumptions, OptionValues options) { ! return new Builder(options, getDebugContext(options, null, method), allowAssumptions).method(method).compilationId(getCompilationId(method)); } protected PhaseSuite<HighTierContext> getDebugGraphBuilderSuite() { return getCustomGraphBuilderSuite(GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withFullInfopoints(true)); } @SuppressWarnings("try") protected StructuredGraph parse(StructuredGraph.Builder builder, PhaseSuite<HighTierContext> graphBuilderSuite) { ResolvedJavaMethod javaMethod = builder.getMethod(); + builder.speculationLog(getSpeculationLog()); if (builder.getCancellable() == null) { builder.cancellable(getCancellable(javaMethod)); } assert javaMethod.getAnnotation(Test.class) == null : "shouldn't parse method with @Test annotation: " + javaMethod; StructuredGraph graph = builder.build();
< prev index next >