@Option.Group(PolyglotImpl.OPTION_GROUP_ENGINE) final class PolyglotEngineOptions { static final String OPTION_GROUP_LOG = "log"; static final String PREINITIALIZE_CONTEXT_NAME = "PreinitializeContexts"; private static final String INSTRUMENT_EXCEPTIONS_ARE_THROWN_NAME = "InstrumentExceptionsAreThrown"; @Option(name = PREINITIALIZE_CONTEXT_NAME, category = OptionCategory.EXPERT, help = "Preinitialize language contexts for given languages.") static final OptionKey<String> PreinitializeContexts = new OptionKey<>( null, OptionType.defaultType(String.class)); /** * When the option is set the exceptions thrown by instruments are propagated rather than logged * into err. */ @Option(name = INSTRUMENT_EXCEPTIONS_ARE_THROWN_NAME, category = OptionCategory.DEBUG, help = "Propagates exceptions thrown by instruments.") static final OptionKey<Boolean> InstrumentExceptionsAreThrown = new OptionKey<>( false); }
@Option.Group(PolyglotImpl.OPTION_GROUP_ENGINE) final class PolyglotEngineOptions { static final String PREINITIALIZE_CONTEXT_NAME = "PreinitializeContexts"; @Option(name = PREINITIALIZE_CONTEXT_NAME, category = OptionCategory.EXPERT, help = "Preinitialize language contexts for given languages.") static final OptionKey<String> PreinitializeContexts = new OptionKey<>( null, OptionType.defaultType(String.class)); }
@Option(help = "Restrict compilation to comma-separated list of includes (or excludes prefixed with tilde).%n%n" + "EBNF format of argument value: CompileOnly = Element, { ',', Element } ;", category = OptionCategory.DEBUG) public static final OptionKey<String> TruffleCompileOnly = new OptionKey<>(null, org.graalvm.options.OptionType.defaultType(String.class)); @Option(help = "Enable or disable truffle compilation.", category = OptionCategory.DEBUG) public static final OptionKey<Boolean> TruffleCompilation = new OptionKey<>(true); @Option(help = "Compile immediately to test truffle compiler", category = OptionCategory.DEBUG) public static final OptionKey<Boolean> TruffleCompileImmediately = new OptionKey<>(false); @Option(help = "Compile call target when call count exceeds this threshold.", category = OptionCategory.USER) public static final OptionKey<Integer> TruffleCompilationThreshold = new OptionKey<>(1000); @Option(help = "Compile call target in the first tier when call count exceeds this threshold.", category = OptionCategory.EXPERT) public static final OptionKey<Integer> TruffleFirstTierCompilationThreshold = new OptionKey<>(100); @Option(help = "Minimum number of calls before a call target is compiled in the first tier.", category = OptionCategory.EXPERT) public static final OptionKey<Integer> TruffleFirstTierMinInvokeThreshold = new OptionKey<>(1); @Option(help = "Defines the maximum timespan in milliseconds that is required for a call target to be queued for compilation.", category = OptionCategory.USER) public static final OptionKey<Integer> TruffleTimeThreshold = new OptionKey<>(50000); @Option(help = "Minimum number of calls before a call target is compiled", category = OptionCategory.EXPERT) public static final OptionKey<Integer> TruffleMinInvokeThreshold = new OptionKey<>(3); @Option(help = "Delay compilation after an invalidation to allow for reprofiling", category = OptionCategory.EXPERT) public static final OptionKey<Integer> TruffleInvalidationReprofileCount = new OptionKey<>(3); @Option(help = "Delay compilation after a node replacement", category = OptionCategory.EXPERT)
@Option(name = "", help = "Enable the CPU tracer (default: false).", category = OptionCategory.USER) static final OptionKey<Boolean> ENABLED = new OptionKey<>(false); @Option(name = "TraceRoots", help = "Capture roots when tracing (default:true).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_ROOTS = new OptionKey<>(true); @Option(name = "TraceStatements", help = "Capture statements when tracing (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_STATEMENTS = new OptionKey<>( false); @Option(name = "TraceCalls", help = "Capture calls when tracing (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_CALLS = new OptionKey<>(false); @Option(name = "TraceInternal", help = "Trace internal elements (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_INTERNAL = new OptionKey<>(false); @Option(name = "FilterRootName", help = "Wildcard filter for program roots. (eg. Math.*, default:*).", category = OptionCategory.USER) static final OptionKey<Object[]> FILTER_ROOT = new OptionKey<>( new Object[0], WILDCARD_FILTER_TYPE); @Option(name = "FilterFile", help = "Wildcard filter for source file paths. (eg. *program*.sl, default:*).", category = OptionCategory.USER) static final OptionKey<Object[]> FILTER_FILE = new OptionKey<>( new Object[0], WILDCARD_FILTER_TYPE); @Option(name = "FilterLanguage", help = "Only profile languages with mime-type. (eg. +, default:no filter).", category = OptionCategory.USER) static final OptionKey<String> FILTER_LANGUAGE = new OptionKey<>( ""); @Option(name = "Output", help = "Print a 'histogram' or 'json' as output (default:HISTOGRAM).", category = OptionCategory.USER) static final OptionKey<Output> OUTPUT = new OptionKey<>( Output.HISTOGRAM, CLI_OUTPUT_TYPE);
@Option(name = "", help = "Enable the Memory Tracer (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> ENABLED = new OptionKey<>(false); @Option(name = "Output", help = "Print a 'typehistogram', 'histogram' or 'calltree' as output (default:histogram).", category = OptionCategory.USER) static final OptionKey<Output> OUTPUT = new OptionKey<>( Output.LOCATION_HISTOGRAM, CLI_OUTPUT_TYPE); @Option(name = "StackLimit", help = "Maximum number of maximum stack elements.", category = OptionCategory.USER) static final OptionKey<Integer> STACK_LIMIT = new OptionKey<>(10000); @Option(name = "TraceRoots", help = "Capture roots when tracing (default:true).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_ROOTS = new OptionKey<>(true); @Option(name = "TraceStatements", help = "Capture statements when tracing (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_STATEMENTS = new OptionKey<>( false); @Option(name = "TraceCalls", help = "Capture calls when tracing (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_CALLS = new OptionKey<>(false); @Option(name = "TraceInternal", help = "Capture internal elements (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> TRACE_INTERNAL = new OptionKey<>(false); @Option(name = "FilterRootName", help = "Wildcard filter for program roots. (eg. Math.*, default:*).", category = OptionCategory.USER) static final OptionKey<Object[]> FILTER_ROOT = new OptionKey<>( new Object[0], WILDCARD_FILTER_TYPE); @Option(name = "FilterFile", help = "Wildcard filter for source file paths. (eg. *program*.sl, default:*).", category = OptionCategory.USER) static final OptionKey<Object[]> FILTER_FILE = new OptionKey<>( new Object[0], WILDCARD_FILTER_TYPE); @Option(name = "FilterLanguage", help = "Only profile languages with mime-type. (eg. +, default:no filter).", category = OptionCategory.USER) static final OptionKey<String> FILTER_LANGUAGE = new OptionKey<>( "");
@Option(name = "", help = "Enable the CPU sampler.", category = OptionCategory.USER) static final OptionKey<Boolean> ENABLED = new OptionKey<>(false); @Option(name = "Mode", help = "Describe level of sampling detail. NOTE: Increased detail can lead to reduced accuracy. Modes: 'exclude_inlined_roots' - sample roots excluding inlined functions (default), " + "'roots' - sample roots including inlined functions, 'statements' - sample all statements.", category = OptionCategory.USER) static final OptionKey<CPUSampler.Mode> MODE = new OptionKey<>(CPUSampler.Mode.EXCLUDE_INLINED_ROOTS, CLI_MODE_TYPE); @Option(name = "Period", help = "Period in milliseconds to sample the stack.", category = OptionCategory.USER) static final OptionKey<Long> SAMPLE_PERIOD = new OptionKey<>(1L); @Option(name = "Delay", help = "Delay the sampling for this many milliseconds (default: 0).", category = OptionCategory.USER) static final OptionKey<Long> DELAY_PERIOD = new OptionKey<>(0L); @Option(name = "StackLimit", help = "Maximum number of maximum stack elements.", category = OptionCategory.USER) static final OptionKey<Integer> STACK_LIMIT = new OptionKey<>(10000); @Option(name = "Output", help = "Print a 'histogram', 'calltree' or 'json' as output (default:HISTOGRAM).", category = OptionCategory.USER) static final OptionKey<Output> OUTPUT = new OptionKey<>( Output.HISTOGRAM, CLI_OUTPUT_TYPE); @Option(name = "FilterRootName", help = "Wildcard filter for program roots. (eg. Math.*, default:*).", category = OptionCategory.USER) static final OptionKey<Object[]> FILTER_ROOT = new OptionKey<>( new Object[0], WILDCARD_FILTER_TYPE); @Option(name = "FilterFile", help = "Wildcard filter for source file paths. (eg. *program*.sl, default:*).", category = OptionCategory.USER) static final OptionKey<Object[]> FILTER_FILE = new OptionKey<>( new Object[0], WILDCARD_FILTER_TYPE); @Option(name = "FilterLanguage", help = "Only profile languages with mime-type. (eg. +, default:no filter).", category = OptionCategory.USER) static final OptionKey<String> FILTER_LANGUAGE = new OptionKey<>( ""); @Option(name = "SampleInternal", help = "Capture internal elements (default:false).", category = OptionCategory.USER) static final OptionKey<Boolean> SAMPLE_INTERNAL = new OptionKey<>(false); @Option(name = "SummariseThreads", help = "Print output as a summary of all 'per thread' profiles. (default: false)", category = OptionCategory.USER) static final OptionKey<Boolean> SUMMARISE_THREADS = new OptionKey<>(false);
@Option(help = "Minimum number of invocations or loop iterations needed to compile a guest language root.", category = OptionCategory.EXPERT) public static final OptionKey<Integer> CompilationThreshold = new OptionKey<>(1000); @Option(help = "Minimum number of invocations or loop iterations needed to compile a guest language root in low tier mode.", category = OptionCategory.EXPERT) public static final OptionKey<Integer> FirstTierCompilationThreshold = new OptionKey<>(100);
@Option(name = "", help = "Start the heap allocation monitor with the application. This produces no output but improves the precision of the data provided to third party tools.", category = OptionCategory.USER) static final OptionKey<Boolean> ENABLED = new OptionKey<>(false);