package org.graalvm.compiler.debug;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class DebugOptions_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "AggregatedMetricsFile": {
return OptionDescriptor.create(
"AggregatedMetricsFile",
OptionType.Debug,
String.class,
"File to which aggregated metrics are dumped at shutdown. A CSV format is used if the file ends with .csv otherwise a more human readable format is used. If not specified, metrics are dumped to the console.",
DebugOptions.class,
"AggregatedMetricsFile",
DebugOptions.AggregatedMetricsFile);
}
case "BootstrapInitializeOnly": {
return OptionDescriptor.create(
"BootstrapInitializeOnly",
OptionType.Debug,
Boolean.class,
"Do not compile anything on bootstrap but just initialize the compiler.",
DebugOptions.class,
"BootstrapInitializeOnly",
DebugOptions.BootstrapInitializeOnly);
}
case "CanonicalGraphStringsCheckConstants": {
return OptionDescriptor.create(
"CanonicalGraphStringsCheckConstants",
OptionType.Debug,
Boolean.class,
"Exclude virtual nodes when dumping canonical text for graphs.",
DebugOptions.class,
"CanonicalGraphStringsCheckConstants",
DebugOptions.CanonicalGraphStringsCheckConstants);
}
case "CanonicalGraphStringsExcludeVirtuals": {
return OptionDescriptor.create(
"CanonicalGraphStringsExcludeVirtuals",
OptionType.Debug,
Boolean.class,
"Exclude virtual nodes when dumping canonical text for graphs.",
DebugOptions.class,
"CanonicalGraphStringsExcludeVirtuals",
DebugOptions.CanonicalGraphStringsExcludeVirtuals);
}
case "CanonicalGraphStringsRemoveIdentities": {
return OptionDescriptor.create(
"CanonicalGraphStringsRemoveIdentities",
OptionType.Debug,
Boolean.class,
"Attempts to remove object identity hashes when dumping canonical text for graphs.",
DebugOptions.class,
"CanonicalGraphStringsRemoveIdentities",
DebugOptions.CanonicalGraphStringsRemoveIdentities);
}
case "ClearMetricsAfterBootstrap": {
return OptionDescriptor.create(
"ClearMetricsAfterBootstrap",
OptionType.Debug,
Boolean.class,
"Clear the debug metrics after bootstrap.",
DebugOptions.class,
"ClearMetricsAfterBootstrap",
DebugOptions.ClearMetricsAfterBootstrap);
}
case "Count": {
return OptionDescriptor.create(
"Count",
OptionType.Debug,
String.class,
"Pattern for specifying scopes in which counters are enabled. See the Dump option for the pattern syntax. An empty value enables all counters unconditionally.",
DebugOptions.class,
"Count",
DebugOptions.Count);
}
case "Counters": {
return OptionDescriptor.create(
"Counters",
OptionType.Debug,
String.class,
"Comma separated names of counters that are enabled irrespective of the value for Count option. An empty value enables all counters unconditionally.",
DebugOptions.class,
"Counters",
DebugOptions.Counters);
}
case "DebugStubsAndSnippets": {
return OptionDescriptor.create(
"DebugStubsAndSnippets",
OptionType.Debug,
Boolean.class,
"Enable debug output for stub code generation and snippet preparation.",
DebugOptions.class,
"DebugStubsAndSnippets",
DebugOptions.DebugStubsAndSnippets);
}
case "Dump": {
return OptionDescriptor.create(
"Dump",
OptionType.Debug,
String.class,
"Filter pattern for specifying scopes in which dumping is enabled.",
new String[] {
"",
"A filter is a list of comma-separated terms of the form:",
" ",
" <pattern>[:<level>]",
" ",
"If <pattern> contains a \"*\" or \"?\" character, it is interpreted as a glob pattern.",
"Otherwise, it is interpreted as a substring. If <pattern> is empty, it",
"matches every scope. If :<level> is omitted, it defaults to 1. The term",
"~<pattern> is a shorthand for <pattern>:0 to disable a debug facility for a pattern.",
"",
"The default log level is 0 (disabled). Terms with an empty pattern set",
"the default log level to the specified value. The last",
"matching term with a non-empty pattern selects the level specified. If",
"no term matches, the log level is the default level. A filter with no",
"terms matches every scope with a log level of 1.",
"",
"Examples of debug filters:",
"--------- ",
" (empty string)",
"",
" Matches any scope with level 1.",
"--------- ",
" :1",
"",
" Matches any scope with level 1.",
"--------- ",
" *",
"",
" Matches any scope with level 1.",
"--------- ",
" CodeGen,CodeInstall",
"",
" Matches scopes containing \"CodeGen\" or \"CodeInstall\", both with level 1.",
"--------- ",
" CodeGen:2,CodeInstall:1",
"",
" Matches scopes containing \"CodeGen\" with level 2, or \"CodeInstall\" with level 1.",
"---------",
" Outer:2,Inner:0}",
"",
" Matches scopes containing \"Outer\" with log level 2, or \"Inner\" with log level 0. If the scope",
" name contains both patterns then the log level will be 0. This is useful for silencing subscopes.",
"---------",
" :1,Dead:2",
"",
" Matches scopes containing \"Dead\" with level 2, and all other scopes with level 1.",
"--------- ",
" Dead:0,:1",
"",
" Matches all scopes with level 1, except those containing \"Dead\". Note that the location of",
" the :1 doesn't matter since it's specifying the default log level so it's the same as",
" specifying :1,Dead:0.",
"--------- ",
" Code*",
"",
" Matches scopes starting with \"Code\" with level 1.",
"--------- ",
" Code,~Dead",
"",
" Matches scopes containing \"Code\" but not \"Dead\", with level 1.",
},
DebugOptions.class,
"Dump",
DebugOptions.Dump);
}
case "DumpOnError": {
return OptionDescriptor.create(
"DumpOnError",
OptionType.Debug,
Boolean.class,
"Send Graal compiler IR to dump handlers on error.",
DebugOptions.class,
"DumpOnError",
DebugOptions.DumpOnError);
}
case "DumpOnPhaseChange": {
return OptionDescriptor.create(
"DumpOnPhaseChange",
OptionType.Debug,
String.class,
"Dump a before and after graph if the named phase changes the graph.%nThe argument is substring matched against the simple name of the phase class",
DebugOptions.class,
"DumpOnPhaseChange",
DebugOptions.DumpOnPhaseChange);
}
case "DumpPath": {
return OptionDescriptor.create(
"DumpPath",
OptionType.Debug,
String.class,
"The directory where various Graal dump files are written.",
DebugOptions.class,
"DumpPath",
DebugOptions.DumpPath);
}
case "DumpingErrorsAreFatal": {
return OptionDescriptor.create(
"DumpingErrorsAreFatal",
OptionType.Debug,
Boolean.class,
"Treat any exceptions during dumping as fatal.",
DebugOptions.class,
"DumpingErrorsAreFatal",
DebugOptions.DumpingErrorsAreFatal);
}
case "InterceptBailout": {
return OptionDescriptor.create(
"InterceptBailout",
OptionType.Debug,
Boolean.class,
"Intercept also bailout exceptions",
DebugOptions.class,
"InterceptBailout",
DebugOptions.InterceptBailout);
}
case "ListMetrics": {
return OptionDescriptor.create(
"ListMetrics",
OptionType.Debug,
Boolean.class,
"Lists on the console at VM shutdown the metric names available to the Timers, Counters and MemUseTrackers options. Note that this only lists the metrics that were initialized during the VM execution and so will not include metrics for compiler code that is not executed.",
DebugOptions.class,
"ListMetrics",
DebugOptions.ListMetrics);
}
case "Log": {
return OptionDescriptor.create(
"Log",
OptionType.Debug,
String.class,
"Pattern for specifying scopes in which logging is enabled. See the Dump option for the pattern syntax.",
DebugOptions.class,
"Log",
DebugOptions.Log);
}
case "LogVerbose": {
return OptionDescriptor.create(
"LogVerbose",
OptionType.Debug,
Boolean.class,
"Enable more verbose log output when available",
DebugOptions.class,
"LogVerbose",
DebugOptions.LogVerbose);
}
case "MemUseTrackers": {
return OptionDescriptor.create(
"MemUseTrackers",
OptionType.Debug,
String.class,
"Comma separated names of memory usage trackers that are enabled irrespective of the value for TrackMemUse option. An empty value enables all memory usage trackers unconditionally.",
DebugOptions.class,
"MemUseTrackers",
DebugOptions.MemUseTrackers);
}
case "MethodFilter": {
return OptionDescriptor.create(
"MethodFilter",
OptionType.Debug,
String.class,
"Pattern for filtering debug scope output based on method context.",
new String[] {
"The syntax for a pattern is:",
"",
" SourcePatterns = SourcePattern [\",\" SourcePatterns] .",
" SourcePattern = [ Class \".\" ] method [ \"(\" [ Parameter { \";\" Parameter } ] \")\" ] .",
" Parameter = Class | \"int\" | \"long\" | \"float\" | \"double\" | \"short\" | \"char\" | \"boolean\" .",
" Class = { package \".\" } class .",
" ",
"Glob pattern matching (*, ?) is allowed in all parts of the source pattern.",
"",
"Examples of method filters:",
"--------- ",
" visit(Argument;BlockScope) ",
" ",
" Matches all methods named \"visit\", with the first parameter of",
" type \"Argument\", and the second parameter of type \"BlockScope\".",
" The packages of the parameter types are irrelevant.",
"---------",
" arraycopy(Object;;;;)",
" ",
" Matches all methods named \"arraycopy\", with the first parameter",
" of type \"Object\", and four more parameters of any type. The",
" packages of the parameter types are irrelevant.",
"--------- ",
" org.graalvm.compiler.core.graph.PostOrderNodeIterator.*",
" ",
" Matches all methods in the class \"org.graalvm.compiler.core.graph.PostOrderNodeIterator\".",
"--------- ",
" *",
" ",
" Matches all methods in all classes",
"---------",
" org.graalvm.compiler.core.graph.*.visit",
" ",
" Matches all methods named \"visit\" in classes in the package",
" \"org.graalvm.compiler.core.graph\".",
"---------",
" arraycopy,toString",
" ",
" Matches all methods named \"arraycopy\" or \"toString\", meaning that ',' acts as an or operator.",
},
DebugOptions.class,
"MethodFilter",
DebugOptions.MethodFilter);
}
case "MethodFilterRootOnly": {
return OptionDescriptor.create(
"MethodFilterRootOnly",
OptionType.Debug,
Boolean.class,
"Only check MethodFilter against the root method in the context if true, otherwise check all methods",
DebugOptions.class,
"MethodFilterRootOnly",
DebugOptions.MethodFilterRootOnly);
}
case "MetricsFile": {
return OptionDescriptor.create(
"MetricsFile",
OptionType.Debug,
String.class,
"File to which metrics are dumped per compilation.",
new String[] {
"A CSV format is used if the file ends with .csv otherwise a more",
"human readable format is used. The fields in the CSV format are:",
" compilable - method being compiled",
" compilable_identity - identity hash code of compilable",
" compilation_nr - where this compilation lies in the ordered",
" sequence of all compilations identified by",
" compilable_identity",
" compilation_id - runtime issued identifier for the compilation",
" metric_name - name of metric",
" metric_value - value of metric",
},
DebugOptions.class,
"MetricsFile",
DebugOptions.MetricsFile);
}
case "MetricsThreadFilter": {
return OptionDescriptor.create(
"MetricsThreadFilter",
OptionType.Debug,
String.class,
"Only report metrics for threads whose name matches the regular expression.",
DebugOptions.class,
"MetricsThreadFilter",
DebugOptions.MetricsThreadFilter);
}
case "PrintBackendCFG": {
return OptionDescriptor.create(
"PrintBackendCFG",
OptionType.Debug,
Boolean.class,
"Enable dumping LIR, register allocation and code generation info to the C1Visualizer.",
DebugOptions.class,
"PrintBackendCFG",
DebugOptions.PrintBackendCFG);
}
case "PrintBinaryGraphPort": {
return OptionDescriptor.create(
"PrintBinaryGraphPort",
OptionType.Debug,
Integer.class,
"Port part of the address to which graphs are dumped in binary format.",
DebugOptions.class,
"PrintBinaryGraphPort",
DebugOptions.PrintBinaryGraphPort);
}
case "PrintCFG": {
return OptionDescriptor.create(
"PrintCFG",
OptionType.Debug,
Boolean.class,
"Enable dumping to the C1Visualizer. Enabling this option implies PrintBackendCFG.",
DebugOptions.class,
"PrintCFG",
DebugOptions.PrintCFG);
}
case "PrintCanonicalGraphStringFlavor": {
return OptionDescriptor.create(
"PrintCanonicalGraphStringFlavor",
OptionType.Debug,
Integer.class,
"Choose format used when dumping canonical text for graphs: 0 gives a scheduled graph (better for spotting changes involving the schedule) while 1 gives a CFG containing expressions rooted at fixed nodes (better for spotting small structure differences)",
DebugOptions.class,
"PrintCanonicalGraphStringFlavor",
DebugOptions.PrintCanonicalGraphStringFlavor);
}
case "PrintCanonicalGraphStrings": {
return OptionDescriptor.create(
"PrintCanonicalGraphStrings",
OptionType.Debug,
Boolean.class,
"Enable dumping canonical text from for graphs.",
DebugOptions.class,
"PrintCanonicalGraphStrings",
DebugOptions.PrintCanonicalGraphStrings);
}
case "PrintGraph": {
return OptionDescriptor.create(
"PrintGraph",
OptionType.Debug,
Boolean.class,
"Enable dumping to the IdealGraphVisualizer.",
DebugOptions.class,
"PrintGraph",
DebugOptions.PrintGraph);
}
case "PrintGraphFile": {
return OptionDescriptor.create(
"PrintGraphFile",
OptionType.Debug,
Boolean.class,
"Print graphs to files instead of sending them over the network.",
DebugOptions.class,
"PrintGraphFile",
DebugOptions.PrintGraphFile);
}
case "PrintGraphHost": {
return OptionDescriptor.create(
"PrintGraphHost",
OptionType.Debug,
String.class,
"Host part of the address to which graphs are dumped.",
DebugOptions.class,
"PrintGraphHost",
DebugOptions.PrintGraphHost);
}
case "PrintGraphWithSchedule": {
return OptionDescriptor.create(
"PrintGraphWithSchedule",
OptionType.Debug,
Boolean.class,
"Schedule graphs as they are dumped.",
DebugOptions.class,
"PrintGraphWithSchedule",
DebugOptions.PrintGraphWithSchedule);
}
case "PrintTruffleTrees": {
return OptionDescriptor.create(
"PrintTruffleTrees",
OptionType.Debug,
Boolean.class,
"Enable dumping Truffle ASTs to the IdealGraphVisualizer.",
DebugOptions.class,
"PrintTruffleTrees",
DebugOptions.PrintTruffleTrees);
}
case "ShowDumpFiles": {
return OptionDescriptor.create(
"ShowDumpFiles",
OptionType.Debug,
Boolean.class,
"Print the name of each dump file path as it's created.",
DebugOptions.class,
"ShowDumpFiles",
DebugOptions.ShowDumpFiles);
}
case "Time": {
return OptionDescriptor.create(
"Time",
OptionType.Debug,
String.class,
"Pattern for specifying scopes in which timing is enabled. See the Dump option for the pattern syntax. An empty value enables all timers unconditionally.",
DebugOptions.class,
"Time",
DebugOptions.Time);
}
case "Timers": {
return OptionDescriptor.create(
"Timers",
OptionType.Debug,
String.class,
"Comma separated names of timers that are enabled irrespective of the value for Time option. An empty value enables all timers unconditionally.",
DebugOptions.class,
"Timers",
DebugOptions.Timers);
}
case "TrackMemUse": {
return OptionDescriptor.create(
"TrackMemUse",
OptionType.Debug,
String.class,
"Pattern for specifying scopes in which memory use tracking is enabled. See the Dump option for the pattern syntax. An empty value enables all memory use trackers unconditionally.",
DebugOptions.class,
"TrackMemUse",
DebugOptions.TrackMemUse);
}
case "Verify": {
return OptionDescriptor.create(
"Verify",
OptionType.Debug,
String.class,
"Pattern for specifying scopes in which logging is enabled. See the Dump option for the pattern syntax.",
DebugOptions.class,
"Verify",
DebugOptions.Verify);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 38;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("AggregatedMetricsFile");
case 1: return get("BootstrapInitializeOnly");
case 2: return get("CanonicalGraphStringsCheckConstants");
case 3: return get("CanonicalGraphStringsExcludeVirtuals");
case 4: return get("CanonicalGraphStringsRemoveIdentities");
case 5: return get("ClearMetricsAfterBootstrap");
case 6: return get("Count");
case 7: return get("Counters");
case 8: return get("DebugStubsAndSnippets");
case 9: return get("Dump");
case 10: return get("DumpOnError");
case 11: return get("DumpOnPhaseChange");
case 12: return get("DumpPath");
case 13: return get("DumpingErrorsAreFatal");
case 14: return get("InterceptBailout");
case 15: return get("ListMetrics");
case 16: return get("Log");
case 17: return get("LogVerbose");
case 18: return get("MemUseTrackers");
case 19: return get("MethodFilter");
case 20: return get("MethodFilterRootOnly");
case 21: return get("MetricsFile");
case 22: return get("MetricsThreadFilter");
case 23: return get("PrintBackendCFG");
case 24: return get("PrintBinaryGraphPort");
case 25: return get("PrintCFG");
case 26: return get("PrintCanonicalGraphStringFlavor");
case 27: return get("PrintCanonicalGraphStrings");
case 28: return get("PrintGraph");
case 29: return get("PrintGraphFile");
case 30: return get("PrintGraphHost");
case 31: return get("PrintGraphWithSchedule");
case 32: return get("PrintTruffleTrees");
case 33: return get("ShowDumpFiles");
case 34: return get("Time");
case 35: return get("Timers");
case 36: return get("TrackMemUse");
case 37: return get("Verify");
}
throw new NoSuchElementException();
}
};
}
}