79 * Gets the singleton {@link HotSpotJVMCIRuntime} object.
80 */
81 public static HotSpotJVMCIRuntime runtime() {
82 JVMCI.initialize();
83 return DelayedInit.instance;
84 }
85
86 /**
87 * A list of all supported JVMCI options.
88 */
89 public enum Option {
90 // @formatter:off
91 Compiler(String.class, null, "Selects the system compiler."),
92 // Note: The following one is not used (see InitTimer.ENABLED). It is added here
93 // so that -XX:+JVMCIPrintProperties shows the option.
94 InitTimer(Boolean.class, false, "Specifies if initialization timing is enabled."),
95 PrintConfig(Boolean.class, false, "Prints VM configuration available via JVMCI."),
96 TraceMethodDataFilter(String.class, null,
97 "Enables tracing of profiling info when read by JVMCI.",
98 "Empty value: trace all methods",
99 "Non-empty value: trace methods whose fully qualified name contains the value.");
100 // @formatter:on
101
102 /**
103 * The prefix for system properties that are JVMCI options.
104 */
105 private static final String JVMCI_OPTION_PROPERTY_PREFIX = "jvmci.";
106
107 /**
108 * Marker for uninitialized flags.
109 */
110 private static final String UNINITIALIZED = "UNINITIALIZED";
111
112 private final Class<?> type;
113 private Object value;
114 private final Object defaultValue;
115 private boolean isDefault;
116 private final String[] helpLines;
117
118 Option(Class<?> type, Object defaultValue, String... helpLines) {
119 assert Character.isUpperCase(name().charAt(0)) : "Option name must start with upper-case letter: " + name();
|
79 * Gets the singleton {@link HotSpotJVMCIRuntime} object.
80 */
81 public static HotSpotJVMCIRuntime runtime() {
82 JVMCI.initialize();
83 return DelayedInit.instance;
84 }
85
86 /**
87 * A list of all supported JVMCI options.
88 */
89 public enum Option {
90 // @formatter:off
91 Compiler(String.class, null, "Selects the system compiler."),
92 // Note: The following one is not used (see InitTimer.ENABLED). It is added here
93 // so that -XX:+JVMCIPrintProperties shows the option.
94 InitTimer(Boolean.class, false, "Specifies if initialization timing is enabled."),
95 PrintConfig(Boolean.class, false, "Prints VM configuration available via JVMCI."),
96 TraceMethodDataFilter(String.class, null,
97 "Enables tracing of profiling info when read by JVMCI.",
98 "Empty value: trace all methods",
99 "Non-empty value: trace methods whose fully qualified name contains the value."),
100 UseProfilingInformation(Boolean.class, true, "");
101 // @formatter:on
102
103 /**
104 * The prefix for system properties that are JVMCI options.
105 */
106 private static final String JVMCI_OPTION_PROPERTY_PREFIX = "jvmci.";
107
108 /**
109 * Marker for uninitialized flags.
110 */
111 private static final String UNINITIALIZED = "UNINITIALIZED";
112
113 private final Class<?> type;
114 private Object value;
115 private final Object defaultValue;
116 private boolean isDefault;
117 private final String[] helpLines;
118
119 Option(Class<?> type, Object defaultValue, String... helpLines) {
120 assert Character.isUpperCase(name().charAt(0)) : "Option name must start with upper-case letter: " + name();
|