Skip to content

Commit

Permalink
[GR-52054] Compiler option cleanup.
Browse files Browse the repository at this point in the history
PullRequest: graal/16949
  • Loading branch information
davleopo committed Mar 3, 2024
2 parents 63542e0 + 0d7cb79 commit 7e8c513
Show file tree
Hide file tree
Showing 29 changed files with 180 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ private void processElement(Element element, OptionsInfo info) {
}

String optionTypeName = getAnnotationValue(annotation, "type", VariableElement.class).getSimpleName().toString();
if (!optionTypeName.equals("Debug")) {
if (help.length() == 0) {
processingEnv.getMessager().printMessage(Kind.ERROR, "Non debug options must always have a option help text " + optionName);
}
}
boolean deprecated = getAnnotationValue(annotation, "deprecated", Boolean.class);
String deprecationMessage = getAnnotationValue(annotation, "deprecationMessage", String.class);
info.options.add(new OptionInfo(optionName, optionTypeName, help, extraHelp, optionType, declaringClass, field.getSimpleName().toString(), stability, deprecated, deprecationMessage));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public void test() throws IOException, InterruptedException {
List<String> vmArgs = withoutDebuggerArguments(getVMCommandLine());
vmArgs.removeIf(a -> a.startsWith("-Djdk.graal."));
vmArgs.add("-Djdk.graal.options.file=" + optionsFile);
vmArgs.add("-Djdk.graal.PrintPropertiesAll=true");
vmArgs.add("-XX:+JVMCIPrintProperties");
Subprocess proc = SubprocessUtil.java(vmArgs);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public class AMD64Assembler extends AMD64BaseAssembler {

public static class Options {
// @formatter:off
@Option(help = "Force branch instructions to align with 32-bytes boundary, to mitigate the jcc erratum. " +
"See https://www.intel.com/content/dam/support/us/en/documents/processors/mitigations-jump-conditional-code-erratum.pdf for more details. " +
"If not set explicitly, the default value will be determined according to the CPU model.", type = OptionType.User)
@Option(help = "Forces branch instructions to align with 32-bytes boundaries, to mitigate the jcc erratum. " +
"See https://www.intel.com/content/dam/support/us/en/documents/processors/mitigations-jump-conditional-code-erratum.pdf for more details. " +
"If not set explicitly, the default value is determined according to the CPU model..", type = OptionType.User)
public static final OptionKey<Boolean> UseBranchesWithin32ByteBoundary = new OptionKey<>(false);
// @formatter:on
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,18 @@ public class GraalCompilerOptions {
"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, stability = OptionStability.STABLE)
@Option(help = "Treats compilation bailouts as 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, 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. " +
"This does not apply to the ExitVM action.", type = OptionType.User)
@Option(help = "Specifies the maximum number of compilation failures to handle with the action specified by " +
"CompilationFailureAction before changing to a less verbose action. " +
"This does not apply to the ExitVM action..", type = OptionType.User)
public static final OptionKey<Integer> MaxCompilationProblemsPerAction = new OptionKey<>(2);
@Option(help = "Compilation failure rate indicating a systemic compilation problem that will issue a warning. " +
@Option(help = "Specifies the compilation failure rate that indicates a systemic compilation problem (and a resulting warning). " +
"The value is made absolute and clamped to produce P, a value between 0 and 100. " +
"Systemic failure is detected if the percent of failing compilations in a sliding time window >= P. " +
"A negative value will cause the VM to exit after issuing the warning. " +
"Set to 0 to disable systemic compilation problem detection.", type = OptionType.User)
"Systemic failure is detected if the percentage of failing compilations in a sliding time window >= P. " +
"A negative value will cause the VM to exit after issuing the warning. Set to 0 to disable systemic compilation problem detection.", type = OptionType.User)
public static final OptionKey<Integer> SystemicCompilationFailureRate = new OptionKey<>(1);
@Option(help = "The number of seconds by which to slow down each compilation. The compilations slowed down " +
"can be restricted with MethodFilter. This option exists to test the compilation watchdog.", type = OptionType.Debug)
Expand Down
Loading

0 comments on commit 7e8c513

Please sign in to comment.