src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilationWrapper.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
27 import static org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.ExitVM; |
27 import static org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.ExitVM; |
28 import static org.graalvm.compiler.core.GraalCompilerOptions.CompilationBailoutAsFailure; |
28 import static org.graalvm.compiler.core.GraalCompilerOptions.CompilationBailoutAsFailure; |
29 import static org.graalvm.compiler.core.GraalCompilerOptions.CompilationFailureAction; |
29 import static org.graalvm.compiler.core.GraalCompilerOptions.CompilationFailureAction; |
30 import static org.graalvm.compiler.core.GraalCompilerOptions.ExitVMOnException; |
30 import static org.graalvm.compiler.core.GraalCompilerOptions.ExitVMOnException; |
31 import static org.graalvm.compiler.core.GraalCompilerOptions.MaxCompilationProblemsPerAction; |
31 import static org.graalvm.compiler.core.GraalCompilerOptions.MaxCompilationProblemsPerAction; |
|
32 import static org.graalvm.compiler.core.common.GraalOptions.TrackNodeSourcePosition; |
32 import static org.graalvm.compiler.debug.DebugContext.VERBOSE_LEVEL; |
33 import static org.graalvm.compiler.debug.DebugContext.VERBOSE_LEVEL; |
33 import static org.graalvm.compiler.debug.DebugOptions.Dump; |
34 import static org.graalvm.compiler.debug.DebugOptions.Dump; |
34 import static org.graalvm.compiler.debug.DebugOptions.DumpPath; |
35 import static org.graalvm.compiler.debug.DebugOptions.DumpPath; |
35 import static org.graalvm.compiler.debug.DebugOptions.MethodFilter; |
36 import static org.graalvm.compiler.debug.DebugOptions.MethodFilter; |
36 |
37 |
272 } |
273 } |
273 |
274 |
274 OptionValues retryOptions = new OptionValues(initialOptions, |
275 OptionValues retryOptions = new OptionValues(initialOptions, |
275 Dump, ":" + VERBOSE_LEVEL, |
276 Dump, ":" + VERBOSE_LEVEL, |
276 MethodFilter, null, |
277 MethodFilter, null, |
277 DumpPath, dumpPath.getPath()); |
278 DumpPath, dumpPath.getPath(), |
|
279 TrackNodeSourcePosition, true); |
278 |
280 |
279 ByteArrayOutputStream logBaos = new ByteArrayOutputStream(); |
281 ByteArrayOutputStream logBaos = new ByteArrayOutputStream(); |
280 PrintStream ps = new PrintStream(logBaos); |
282 PrintStream ps = new PrintStream(logBaos); |
281 try (DebugContext retryDebug = createRetryDebugContext(initialDebug, retryOptions, ps)) { |
283 try (DebugContext retryDebug = createRetryDebugContext(initialDebug, retryOptions, ps)) { |
282 T res = performCompilation(retryDebug); |
284 T res = performCompilation(retryDebug); |