84
85 /**
86 * Gets the singleton {@link HotSpotJVMCIRuntime} object.
87 */
88 public static HotSpotJVMCIRuntime runtime() {
89 JVMCI.initialize();
90 return DelayedInit.instance;
91 }
92
93 /**
94 * A list of all supported JVMCI options.
95 */
96 public enum Option {
97 Compiler(String.class, null, "Selects the system compiler."),
98 ImplicitStableValues(boolean.class, true, "Mark well-known stable fields as such."),
99 // Note: The following one is not used (see InitTimer.ENABLED).
100 InitTimer(boolean.class, false, "Specifies if initialization timing is enabled."),
101 PrintConfig(boolean.class, false, "Prints all HotSpotVMConfig fields."),
102 PrintFlags(boolean.class, false, "Prints all JVMCI flags and exits."),
103 ShowFlags(boolean.class, false, "Prints all JVMCI flags and continues."),
104 TraceMethodDataFilter(String.class, null, ""),
105 TrustFinalDefaultFields(boolean.class, true, "Determines whether to treat final fields with default values as constant.");
106
107 /**
108 * The prefix for system properties that are JVMCI options.
109 */
110 private static final String JVMCI_OPTION_PROPERTY_PREFIX = "jvmci.";
111
112 /**
113 * Marker for uninitialized flags.
114 */
115 private static final String UNINITIALIZED = "UNINITIALIZED";
116
117 private final Class<?> type;
118 private Object value;
119 private final Object defaultValue;
120 private boolean isDefault;
121 private final String help;
122
123 Option(Class<?> type, Object defaultValue, String help) {
124 assert Character.isUpperCase(name().charAt(0)) : "Option name must start with upper-case letter: " + name();
125 this.type = type;
|
84
85 /**
86 * Gets the singleton {@link HotSpotJVMCIRuntime} object.
87 */
88 public static HotSpotJVMCIRuntime runtime() {
89 JVMCI.initialize();
90 return DelayedInit.instance;
91 }
92
93 /**
94 * A list of all supported JVMCI options.
95 */
96 public enum Option {
97 Compiler(String.class, null, "Selects the system compiler."),
98 ImplicitStableValues(boolean.class, true, "Mark well-known stable fields as such."),
99 // Note: The following one is not used (see InitTimer.ENABLED).
100 InitTimer(boolean.class, false, "Specifies if initialization timing is enabled."),
101 PrintConfig(boolean.class, false, "Prints all HotSpotVMConfig fields."),
102 PrintFlags(boolean.class, false, "Prints all JVMCI flags and exits."),
103 ShowFlags(boolean.class, false, "Prints all JVMCI flags and continues."),
104 TraceMethodDataFilter(String.class, null, "");
105
106 /**
107 * The prefix for system properties that are JVMCI options.
108 */
109 private static final String JVMCI_OPTION_PROPERTY_PREFIX = "jvmci.";
110
111 /**
112 * Marker for uninitialized flags.
113 */
114 private static final String UNINITIALIZED = "UNINITIALIZED";
115
116 private final Class<?> type;
117 private Object value;
118 private final Object defaultValue;
119 private boolean isDefault;
120 private final String help;
121
122 Option(Class<?> type, Object defaultValue, String help) {
123 assert Character.isUpperCase(name().charAt(0)) : "Option name must start with upper-case letter: " + name();
124 this.type = type;
|