Skip to content

Commit

Permalink
marked selected options as stable
Browse files Browse the repository at this point in the history
  • Loading branch information
dougxc committed May 30, 2019
1 parent 9f5ea47 commit cfb871b
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionStability;
import org.graalvm.compiler.options.OptionType;

/**
Expand Down Expand Up @@ -270,7 +271,7 @@ public final class GraalOptions {
@Option(help = "Use a cache for snippet graphs.", type = OptionType.Debug)
public static final OptionKey<Boolean> UseSnippetGraphCache = new OptionKey<>(true);

@Option(help = "file:doc-files/TraceInliningHelp.txt", type = OptionType.Debug)
@Option(help = "file:doc-files/TraceInliningHelp.txt", type = OptionType.Debug, stability = OptionStability.STABLE)
public static final OptionKey<Boolean> TraceInlining = new OptionKey<>(false);

@Option(help = "Enable inlining decision tracing in stubs and snippets.", type = OptionType.Debug)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.graalvm.compiler.options.EnumOptionKey;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionStability;
import org.graalvm.compiler.options.OptionType;

public enum SpeculativeExecutionAttacksMitigations {
Expand All @@ -39,7 +40,7 @@ public static class Options {
// @formatter:off
@Option(help = "file:doc-files/MitigateSpeculativeExecutionAttacksHelp.txt")
public static final EnumOptionKey<SpeculativeExecutionAttacksMitigations> MitigateSpeculativeExecutionAttacks = new EnumOptionKey<>(None);
@Option(help = "Use index masking after bounds check to mitigate speculative execution attacks.", type = OptionType.User)
@Option(help = "Use index masking after bounds check to mitigate speculative execution attacks.", type = OptionType.User, stability = OptionStability.STABLE)
public static final OptionKey<Boolean> UseIndexMasking = new OptionKey<>(false);
// @formatter:on
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.graalvm.compiler.options.EnumOptionKey;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionStability;
import org.graalvm.compiler.options.OptionType;

/**
Expand All @@ -36,17 +37,17 @@
public class GraalCompilerOptions {

// @formatter:off
@Option(help = "Print an informational line to the console for each completed compilation.", type = OptionType.Debug)
@Option(help = "Print an informational line to the console for each completed compilation.", type = OptionType.Debug, stability = OptionStability.STABLE)
public static final OptionKey<Boolean> PrintCompilation = new OptionKey<>(false);
@Option(help = "Pattern for method(s) that will trigger an exception when compiled. " +
"This option exists to test handling compilation crashes gracefully. " +
"See the MethodFilter option for the pattern syntax. A ':Bailout' " +
"suffix will raise a bailout exception and a ':PermanentBailout' " +
"suffix will raise a permanent bailout exception.", type = OptionType.Debug)
public static final OptionKey<String> CrashAt = new OptionKey<>(null);
@Option(help = "Treat compilation bailouts like compilation failures.", type = OptionType.User)
@Option(help = "Treat compilation bailouts like compilation failures.", type = OptionType.User, stability = OptionStability.STABLE)
public static final OptionKey<Boolean> CompilationBailoutAsFailure = new OptionKey<>(false);
@Option(help = "file:doc-files/CompilationFailureActionHelp.txt", type = OptionType.User)
@Option(help = "file:doc-files/CompilationFailureActionHelp.txt", type = OptionType.User, stability = OptionStability.STABLE)
public static final EnumOptionKey<ExceptionAction> CompilationFailureAction = new EnumOptionKey<>(ExceptionAction.Silent);
@Option(help = "The maximum number of compilation failures to handle with the action specified " +
"by CompilationFailureAction before changing to a less verbose action. " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.graalvm.compiler.options.EnumOptionKey;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionStability;
import org.graalvm.compiler.options.OptionType;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.serviceprovider.GraalServices;
Expand Down Expand Up @@ -94,12 +95,12 @@ public enum PrintGraphTarget {
@Option(help = "Pattern for specifying scopes in which logging is enabled. " +
"See the Dump option for the pattern syntax.", type = OptionType.Debug)
public static final OptionKey<String> Verify = new OptionKey<>(null);
@Option(help = "file:doc-files/DumpHelp.txt", type = OptionType.Debug)
@Option(help = "file:doc-files/DumpHelp.txt", type = OptionType.Debug, stability = OptionStability.STABLE)
public static final OptionKey<String> Dump = new OptionKey<>(null);
@Option(help = "Pattern for specifying scopes in which logging is enabled. " +
"See the Dump option for the pattern syntax.", type = OptionType.Debug)
public static final OptionKey<String> Log = new OptionKey<>(null);
@Option(help = "file:doc-files/MethodFilterHelp.txt")
@Option(help = "file:doc-files/MethodFilterHelp.txt", stability = OptionStability.STABLE)
public static final OptionKey<String> MethodFilter = new OptionKey<>(null);
@Option(help = "Only check MethodFilter against the root method in the context if true, otherwise check all methods", type = OptionType.Debug)
public static final OptionKey<Boolean> MethodFilterRootOnly = new OptionKey<>(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.graalvm.compiler.options.EnumOptionKey;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionStability;
import org.graalvm.compiler.options.OptionType;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.BasePhase;
Expand Down Expand Up @@ -69,9 +70,9 @@ static class Options {
// @formatter:off
@Option(help = "Names the compiler configuration to use. If omitted, the compiler configuration " +
"with the highest auto-selection priority is used. To see the set of available configurations, " +
"supply the value 'help' to this option.", type = OptionType.Expert)
"supply the value 'help' to this option.", type = OptionType.Expert, stability = OptionStability.STABLE)
public static final OptionKey<String> CompilerConfiguration = new OptionKey<>(null);
@Option(help = "Writes to the VM log information about the compiler configuration selected.", type = OptionType.User)
@Option(help = "Writes to the VM log information about the compiler configuration selected.", type = OptionType.User, stability = OptionStability.STABLE)
public static final OptionKey<ShowConfigurationLevel> ShowConfiguration = new EnumOptionKey<>(ShowConfigurationLevel.none);
// @formatter:on
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@
* Specifies the type of the option.
*/
OptionType type() default OptionType.Debug;

/**
* Specifies the stability of the option.
*/
OptionStability stability() default OptionStability.EXPERIMENTAL;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.graalvm.compiler.options;

/**
* Categorizes options according to their stability.
*/
public enum OptionStability {

/**
* A stable option is expected to remain available for many releases. End users can rely on such
* an option being present. A stable option can still be removed but will go through a clear
* deprecating process before being removed.
*/
STABLE,

/**
* An experimental option has no guarantees of stability and might be removed at any point.
*/
EXPERIMENTAL
}

0 comments on commit cfb871b

Please sign in to comment.