package org.graalvm.compiler.hotspot.replacements;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class HotspotSnippetsOptions_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "LoadExceptionObjectInVM": {
return OptionDescriptor.create(
"LoadExceptionObjectInVM",
OptionType.Debug,
Boolean.class,
"Use a VM runtime call to load and clear the exception object from the thread at the start of a compiled exception handler.",
HotspotSnippetsOptions.class,
"LoadExceptionObjectInVM",
HotspotSnippetsOptions.LoadExceptionObjectInVM);
}
case "ProfileAllocations": {
return OptionDescriptor.create(
"ProfileAllocations",
OptionType.Debug,
Boolean.class,
"Enable profiling of allocation sites.",
HotspotSnippetsOptions.class,
"ProfileAllocations",
HotspotSnippetsOptions.ProfileAllocations);
}
case "ProfileAllocationsContext": {
return OptionDescriptor.create(
"ProfileAllocationsContext",
OptionType.Debug,
org.graalvm.compiler.hotspot.replacements.HotSpotAllocationSnippets.ProfileContext.class,
"Control the naming and granularity of the counters when using ProfileAllocations.",
new String[] {
"The accepted values are:",
" AllocatingMethod - a counter per method",
" InstanceOrArray - one counter for all instance allocations and",
" one counter for all array allocations ",
" AllocatedType - one counter per allocated type",
" AllocatedTypesInMethod - one counter per allocated type, per method",
" ",
},
HotspotSnippetsOptions.class,
"ProfileAllocationsContext",
HotspotSnippetsOptions.ProfileAllocationsContext);
}
case "ProfileMonitors": {
return OptionDescriptor.create(
"ProfileMonitors",
OptionType.Debug,
Boolean.class,
"Enable profiling of monitor operations.",
HotspotSnippetsOptions.class,
"ProfileMonitors",
HotspotSnippetsOptions.ProfileMonitors);
}
case "SimpleFastInflatedLocking": {
return OptionDescriptor.create(
"SimpleFastInflatedLocking",
OptionType.Expert,
Boolean.class,
"Handle simple cases for inflated monitors in the fast-path.",
HotspotSnippetsOptions.class,
"SimpleFastInflatedLocking",
HotspotSnippetsOptions.SimpleFastInflatedLocking);
}
case "TraceMonitorsMethodFilter": {
return OptionDescriptor.create(
"TraceMonitorsMethodFilter",
OptionType.Debug,
String.class,
"Trace monitor operations in methods whose fully qualified name contains this substring.",
HotspotSnippetsOptions.class,
"TraceMonitorsMethodFilter",
HotspotSnippetsOptions.TraceMonitorsMethodFilter);
}
case "TraceMonitorsTypeFilter": {
return OptionDescriptor.create(
"TraceMonitorsTypeFilter",
OptionType.Debug,
String.class,
"Trace monitor operations on objects whose type contains this substring.",
HotspotSnippetsOptions.class,
"TraceMonitorsTypeFilter",
HotspotSnippetsOptions.TraceMonitorsTypeFilter);
}
case "TypeCheckMaxHints": {
return OptionDescriptor.create(
"TypeCheckMaxHints",
OptionType.Expert,
Integer.class,
"The maximum number of profiled types that will be used when compiling a profiled type check. Note that TypeCheckMinProfileHitProbability also influences whether profiling info is used in compiled type checks.",
HotspotSnippetsOptions.class,
"TypeCheckMaxHints",
HotspotSnippetsOptions.TypeCheckMaxHints);
}
case "TypeCheckMinProfileHitProbability": {
return OptionDescriptor.create(
"TypeCheckMinProfileHitProbability",
OptionType.Expert,
Double.class,
"If the probability that a type check will hit one the profiled types (up to TypeCheckMaxHints) is below this value, the type check will be compiled without profiling info",
HotspotSnippetsOptions.class,
"TypeCheckMinProfileHitProbability",
HotspotSnippetsOptions.TypeCheckMinProfileHitProbability);
}
case "VerifyBalancedMonitors": {
return OptionDescriptor.create(
"VerifyBalancedMonitors",
OptionType.Debug,
Boolean.class,
"Emit extra code to dynamically check monitor operations are balanced.",
HotspotSnippetsOptions.class,
"VerifyBalancedMonitors",
HotspotSnippetsOptions.VerifyBalancedMonitors);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 10;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("LoadExceptionObjectInVM");
case 1: return get("ProfileAllocations");
case 2: return get("ProfileAllocationsContext");
case 3: return get("ProfileMonitors");
case 4: return get("SimpleFastInflatedLocking");
case 5: return get("TraceMonitorsMethodFilter");
case 6: return get("TraceMonitorsTypeFilter");
case 7: return get("TypeCheckMaxHints");
case 8: return get("TypeCheckMinProfileHitProbability");
case 9: return get("VerifyBalancedMonitors");
}
throw new NoSuchElementException();
}
};
}
}