annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotOptions.java @ 21527:07b088d61d5d

added HotSpotJVMCIRuntime* classes, replaced references to HotSpotGraalRuntime in VM with HotSpotJVMCIRuntime (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Fri, 22 May 2015 23:26:20 +0200
parents 1da7aef31a08
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
4 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
8 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
13 * accompanied this code).
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
14 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
18 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
21 * questions.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
22 */
21526
1da7aef31a08 created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21475
diff changeset
23 package com.oracle.graal.hotspot.jvmci;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24
11561
e1309fc4d17f ensure Debug.enable() is called before any DebugTimer or DebugMetric objects are requested
Doug Simon <doug.simon@oracle.com>
parents: 11365
diff changeset
25 import static com.oracle.graal.compiler.GraalDebugConfig.*;
21526
1da7aef31a08 created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21475
diff changeset
26 import static com.oracle.graal.hotspot.jvmci.HotSpotOptionsLoader.*;
15870
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
27 import static java.lang.Double.*;
9935
2a091d2987bd added graal.options mechanism for being able to override default option values
Doug Simon <doug.simon@oracle.com>
parents: 9919
diff changeset
28
15591
55977f9fa56f fixed assertion position and documented critical class initialization dependency
Doug Simon <doug.simon@oracle.com>
parents: 15470
diff changeset
29 import com.oracle.graal.api.runtime.*;
11561
e1309fc4d17f ensure Debug.enable() is called before any DebugTimer or DebugMetric objects are requested
Doug Simon <doug.simon@oracle.com>
parents: 11365
diff changeset
30 import com.oracle.graal.debug.*;
21526
1da7aef31a08 created com.oracle.graal.hotspot.jvmci package and moved classes destined for future JVMCI module into it (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21475
diff changeset
31 import com.oracle.graal.hotspot.*;
9849
e876c2a6954f extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents: 7739
diff changeset
32 import com.oracle.graal.options.*;
18684
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
33 import com.oracle.graal.options.OptionUtils.OptionConsumer;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
34
16029
8bbfddf8483f exclude CompilationQueue and HotSpotOptions from JaCoCo
Doug Simon <doug.simon@oracle.com>
parents: 16006
diff changeset
35 //JaCoCo Exclude
8bbfddf8483f exclude CompilationQueue and HotSpotOptions from JaCoCo
Doug Simon <doug.simon@oracle.com>
parents: 16006
diff changeset
36
9935
2a091d2987bd added graal.options mechanism for being able to override default option values
Doug Simon <doug.simon@oracle.com>
parents: 9919
diff changeset
37 /**
18684
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
38 * Sets Graal options from the HotSpot command line. Such options are distinguished by the
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
39 * {@link #GRAAL_OPTION_PREFIX} prefix.
9935
2a091d2987bd added graal.options mechanism for being able to override default option values
Doug Simon <doug.simon@oracle.com>
parents: 9919
diff changeset
40 */
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
41 public class HotSpotOptions {
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
42
18684
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
43 private static final String GRAAL_OPTION_PREFIX = "-G:";
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
44
9935
2a091d2987bd added graal.options mechanism for being able to override default option values
Doug Simon <doug.simon@oracle.com>
parents: 9919
diff changeset
45 /**
15870
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
46 * Parses the Graal specific options specified to HotSpot (e.g., on the command line).
9986
4f542ceb5fed added VerifyHotSpotOptionsPhase to ensure that global state is not initialized from options prior to command line parsing
Doug Simon <doug.simon@oracle.com>
parents: 9935
diff changeset
47 */
21473
923c37b10fb4 compute compiled bytecodes using method inlining recording instead of a DebugMetric
Doug Simon <doug.simon@oracle.com>
parents: 20016
diff changeset
48 private static native void parseVMOptions();
15603
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
49
9935
2a091d2987bd added graal.options mechanism for being able to override default option values
Doug Simon <doug.simon@oracle.com>
parents: 9919
diff changeset
50 static {
21475
e538b5923ff0 fixed regression that disabled parsing of Graal command line options
Doug Simon <doug.simon@oracle.com>
parents: 21473
diff changeset
51 parseVMOptions();
e538b5923ff0 fixed regression that disabled parsing of Graal command line options
Doug Simon <doug.simon@oracle.com>
parents: 21473
diff changeset
52
15603
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
53 assert !Debug.Initialization.isDebugInitialized() : "The class " + Debug.class.getName() + " must not be initialized before the Graal runtime has been initialized. " +
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
54 "This can be fixed by placing a call to " + Graal.class.getName() + ".runtime() on the path that triggers initialization of " + Debug.class.getName();
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
55 if (areDebugScopePatternsEnabled()) {
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
56 System.setProperty(Debug.Initialization.INITIALIZER_PROPERTY_NAME, "true");
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
57 }
20016
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
58 if ("".equals(Meter.getValue())) {
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
59 System.setProperty(Debug.ENABLE_UNSCOPED_METRICS_PROPERTY_NAME, "true");
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
60 }
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
61 if ("".equals(Time.getValue())) {
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
62 System.setProperty(Debug.ENABLE_UNSCOPED_TIMERS_PROPERTY_NAME, "true");
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
63 }
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
64 if ("".equals(TrackMemUse.getValue())) {
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
65 System.setProperty(Debug.ENABLE_UNSCOPED_MEM_USE_TRACKERS_PROPERTY_NAME, "true");
e7e868a42b3f avoid creation of scopes if -G:Time, -G:Meter and -G:TrackMemUse all have null or empty values and no other debug scope based options are given (e.g., -G:Log, -G:Dump, etc)
Doug Simon <doug.simon@oracle.com>
parents: 18684
diff changeset
66 }
9935
2a091d2987bd added graal.options mechanism for being able to override default option values
Doug Simon <doug.simon@oracle.com>
parents: 9919
diff changeset
67 }
2a091d2987bd added graal.options mechanism for being able to override default option values
Doug Simon <doug.simon@oracle.com>
parents: 9919
diff changeset
68
15603
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
69 /**
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
70 * Ensures {@link HotSpotOptions} is initialized.
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
71 */
b7fb36e57da8 made Graal initialization be driven from Java to simplify sequencing and synchronization
Doug Simon <doug.simon@oracle.com>
parents: 15591
diff changeset
72 public static void initialize() {
13353
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
73 }
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
74
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
75 /**
15870
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
76 * Helper for the VM code called by {@link #parseVMOptions()}.
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
77 *
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
78 * @param name the name of a parsed option
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
79 * @param option the object encapsulating the option
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
80 * @param spec specification of boolean option value, type of option value or action to take
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
81 */
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
82 static void setOption(String name, OptionValue<?> option, char spec, String stringValue, long primitiveValue) {
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
83 switch (spec) {
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
84 case '+':
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
85 option.setValue(Boolean.TRUE);
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
86 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
87 case '-':
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
88 option.setValue(Boolean.FALSE);
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
89 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
90 case '?':
18684
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
91 OptionUtils.printFlags(options, GRAAL_OPTION_PREFIX);
15870
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
92 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
93 case ' ':
18684
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
94 OptionUtils.printNoMatchMessage(options, name, GRAAL_OPTION_PREFIX);
15870
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
95 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
96 case 'i':
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
97 option.setValue((int) primitiveValue);
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
98 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
99 case 'f':
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
100 option.setValue((float) longBitsToDouble(primitiveValue));
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
101 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
102 case 'd':
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
103 option.setValue(longBitsToDouble(primitiveValue));
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
104 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
105 case 's':
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
106 option.setValue(stringValue);
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
107 break;
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
108 }
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
109 }
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
110
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
111 /**
13353
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
112 * Parses a given option value specification.
15470
c55f44b3c5e5 remove NodesToDoubles, refactoring of node probability and inlining relevance computation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15193
diff changeset
113 *
13353
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
114 * @param option the specification of an option and its value
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
115 * @param setter the object to notify of the parsed option and value. If null, the
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
116 * {@link OptionValue#setValue(Object)} method of the specified option is called
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
117 * instead.
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
118 */
0e5c4f9fa9a5 enabled non-hosted CompileTheWorld execution with complete bootstrapping and the ability to override compilation options separately for CTW compilations
Doug Simon <doug.simon@oracle.com>
parents: 13106
diff changeset
119 public static boolean parseOption(String option, OptionConsumer setter) {
18684
137773e5250c Factor out VM-independent parts of option parsing
Christian Wimmer <christian.wimmer@oracle.com>
parents: 16399
diff changeset
120 return OptionUtils.parseOption(options, option, GRAAL_OPTION_PREFIX, setter);
15870
fe608a56e3f7 made HotSpotOptions processing faster by removing use of service loader in VM startup and only doing work for options specified on the command line
Doug Simon <doug.simon@oracle.com>
parents: 15603
diff changeset
121 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
122 }