package org.graalvm.compiler.hotspot.phases.profiling;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class FinalizeProfileNodesPhase_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "ProfileSimpleMethods": {
return OptionDescriptor.create(
"ProfileSimpleMethods",
OptionType.Expert,
Boolean.class,
"Profile simple methods",
FinalizeProfileNodesPhase.Options.class,
"ProfileSimpleMethods",
FinalizeProfileNodesPhase.Options.ProfileSimpleMethods);
}
case "SimpleMethodCalls": {
return OptionDescriptor.create(
"SimpleMethodCalls",
OptionType.Expert,
Integer.class,
"Maximum number of calls in a simple method",
FinalizeProfileNodesPhase.Options.class,
"SimpleMethodCalls",
FinalizeProfileNodesPhase.Options.SimpleMethodCalls);
}
case "SimpleMethodGraphSize": {
return OptionDescriptor.create(
"SimpleMethodGraphSize",
OptionType.Expert,
Integer.class,
"Maximum number of nodes in a graph for a simple method",
FinalizeProfileNodesPhase.Options.class,
"SimpleMethodGraphSize",
FinalizeProfileNodesPhase.Options.SimpleMethodGraphSize);
}
case "SimpleMethodIndirectCalls": {
return OptionDescriptor.create(
"SimpleMethodIndirectCalls",
OptionType.Expert,
Integer.class,
"Maximum number of indirect calls in a simple moethod",
FinalizeProfileNodesPhase.Options.class,
"SimpleMethodIndirectCalls",
FinalizeProfileNodesPhase.Options.SimpleMethodIndirectCalls);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 4;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("ProfileSimpleMethods");
case 1: return get("SimpleMethodCalls");
case 2: return get("SimpleMethodGraphSize");
case 3: return get("SimpleMethodIndirectCalls");
}
throw new NoSuchElementException();
}
};
}
}