src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java
author never
Wed, 27 Jun 2018 17:02:41 -0700
changeset 50858 2d3e99a72541
parent 49873 26ebfe8ce852
child 51736 42d99cb7f50f
permissions -rw-r--r--
8205824: Update Graal Reviewed-by: iveresov, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     1
/*
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     4
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     8
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    13
 * accompanied this code).
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    14
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    18
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    21
 * questions.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    22
 */
50858
2d3e99a72541 8205824: Update Graal
never
parents: 49873
diff changeset
    23
2d3e99a72541 8205824: Update Graal
never
parents: 49873
diff changeset
    24
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    25
package org.graalvm.compiler.core;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    26
46680
2894e4262fd6 8184768: Update Graal
iveresov
parents: 46371
diff changeset
    27
import org.graalvm.compiler.core.CompilationWrapper.ExceptionAction;
2894e4262fd6 8184768: Update Graal
iveresov
parents: 46371
diff changeset
    28
import org.graalvm.compiler.options.EnumOptionKey;
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    29
import org.graalvm.compiler.options.Option;
46344
694c102fd8ed 8177046: Update Graal
iveresov
parents: 43972
diff changeset
    30
import org.graalvm.compiler.options.OptionKey;
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    31
import org.graalvm.compiler.options.OptionType;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    32
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    33
/**
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    34
 * Options related to {@link GraalCompiler}.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    35
 */
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    36
public class GraalCompilerOptions {
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    37
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    38
    // @formatter:off
46680
2894e4262fd6 8184768: Update Graal
iveresov
parents: 46371
diff changeset
    39
    @Option(help = "Print an informational line to the console for each completed compilation.", type = OptionType.Debug)
46344
694c102fd8ed 8177046: Update Graal
iveresov
parents: 43972
diff changeset
    40
    public static final OptionKey<Boolean> PrintCompilation = new OptionKey<>(false);
46963
089674d9949b 8186681: Update Graal
iveresov
parents: 46807
diff changeset
    41
    @Option(help = "Pattern for method(s) that will trigger an exception when compiled. " +
089674d9949b 8186681: Update Graal
iveresov
parents: 46807
diff changeset
    42
                   "This option exists to test handling compilation crashes gracefully. " +
49873
26ebfe8ce852 8199755: Update Graal
dlong
parents: 47798
diff changeset
    43
                   "See the MethodFilter option for the pattern syntax. A ':Bailout' " +
26ebfe8ce852 8199755: Update Graal
dlong
parents: 47798
diff changeset
    44
                   "suffix will raise a bailout exception and a ':PermanentBailout' " +
26ebfe8ce852 8199755: Update Graal
dlong
parents: 47798
diff changeset
    45
                   "suffix will raise a permanent bailout exception.", type = OptionType.Debug)
46371
0337d0617e7b 8178088: Update Graal
iveresov
parents: 46344
diff changeset
    46
    public static final OptionKey<String> CrashAt = new OptionKey<>(null);
46963
089674d9949b 8186681: Update Graal
iveresov
parents: 46807
diff changeset
    47
    @Option(help = "file:doc-files/CompilationBailoutActionHelp.txt", type = OptionType.User)
089674d9949b 8186681: Update Graal
iveresov
parents: 46807
diff changeset
    48
    public static final EnumOptionKey<ExceptionAction> CompilationBailoutAction = new EnumOptionKey<>(ExceptionAction.Silent);
089674d9949b 8186681: Update Graal
iveresov
parents: 46807
diff changeset
    49
    @Option(help = "Specifies the action to take when compilation fails with a bailout exception. " +
49873
26ebfe8ce852 8199755: Update Graal
dlong
parents: 47798
diff changeset
    50
                   "The accepted values are the same as for CompilationBailoutAction.", type = OptionType.User)
46963
089674d9949b 8186681: Update Graal
iveresov
parents: 46807
diff changeset
    51
     public static final EnumOptionKey<ExceptionAction> CompilationFailureAction = new EnumOptionKey<>(ExceptionAction.Diagnose);
46807
8b2c620d7092 8186158: Update Graal
iveresov
parents: 46680
diff changeset
    52
    @Option(help = "The maximum number of compilation failures or bailouts to handle with the action specified " +
8b2c620d7092 8186158: Update Graal
iveresov
parents: 46680
diff changeset
    53
                   "by CompilationFailureAction or CompilationBailoutAction before changing to a less verbose action.", type = OptionType.User)
47798
9fe9292f5931 8190710: Update Graal
dlong
parents: 47216
diff changeset
    54
    public static final OptionKey<Integer> MaxCompilationProblemsPerAction = new OptionKey<>(2);
46807
8b2c620d7092 8186158: Update Graal
iveresov
parents: 46680
diff changeset
    55
    @Option(help = "Alias for CompilationFailureAction=ExitVM.", type = OptionType.User)
46680
2894e4262fd6 8184768: Update Graal
iveresov
parents: 46371
diff changeset
    56
    public static final OptionKey<Boolean> ExitVMOnException = new OptionKey<>(false);
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    57
    // @formatter:on
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    58
}