Mercurial > hg > graal-jvmci-8
comparison src/share/vm/jvmci/jvmciRuntime.hpp @ 22398:4f6caa445b92
moved JVMCI option parsing back into Java
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 04 Aug 2015 00:47:34 +0200 |
parents | 0e095e2c24e2 |
children | a1b0a76567c7 |
comparison
equal
deleted
inserted
replaced
22397:7202e96981c6 | 22398:4f6caa445b92 |
---|---|
26 | 26 |
27 #include "interpreter/interpreter.hpp" | 27 #include "interpreter/interpreter.hpp" |
28 #include "memory/allocation.hpp" | 28 #include "memory/allocation.hpp" |
29 #include "runtime/arguments.hpp" | 29 #include "runtime/arguments.hpp" |
30 #include "runtime/deoptimization.hpp" | 30 #include "runtime/deoptimization.hpp" |
31 #include "jvmci/jvmciOptions.hpp" | |
32 | 31 |
33 class ParseClosure : public StackObj { | 32 class ParseClosure : public StackObj { |
34 int _lineNo; | 33 int _lineNo; |
35 char* _filename; | 34 char* _filename; |
36 bool _abort; | 35 bool _abort; |
57 | 56 |
58 class JVMCIRuntime: public CHeapObj<mtCompiler> { | 57 class JVMCIRuntime: public CHeapObj<mtCompiler> { |
59 private: | 58 private: |
60 static jobject _HotSpotJVMCIRuntime_instance; | 59 static jobject _HotSpotJVMCIRuntime_instance; |
61 static bool _HotSpotJVMCIRuntime_initialized; | 60 static bool _HotSpotJVMCIRuntime_initialized; |
61 static const char* _options; | |
62 | 62 |
63 static bool _shutdown_called; | 63 static bool _shutdown_called; |
64 | |
65 /** | |
66 * Loads default option value overrides from a <jre_home>/lib/jvmci.options if it exists. Each | |
67 * line in this file must have the format of a JVMCI command line option without the | |
68 * leading "-G:" prefix. These option values are set prior to processing of any JVMCI | |
69 * options present on the command line. | |
70 */ | |
71 static void parse_jvmci_options_file(OptionValuesTable* options); | |
72 | |
73 static void print_flags_helper(TRAPS); | |
74 | 64 |
75 /** | 65 /** |
76 * Instantiates a service object, calls its default constructor and returns it. | 66 * Instantiates a service object, calls its default constructor and returns it. |
77 * | 67 * |
78 * @param name the name of a class implementing jdk.internal.jvmci.service.Service | 68 * @param name the name of a class implementing jdk.internal.jvmci.service.Service |
85 * Parses *.properties files in jre/lib/jvmci/ and adds the properties to plist. | 75 * Parses *.properties files in jre/lib/jvmci/ and adds the properties to plist. |
86 */ | 76 */ |
87 static void parse_properties(SystemProperty** plist); | 77 static void parse_properties(SystemProperty** plist); |
88 | 78 |
89 /** | 79 /** |
90 * Parses the JVMCI specific VM options that were presented by the launcher and sets | 80 * Saves the value of the "jvmci.options" system property for processing |
91 * the relevants Java fields. | 81 * when JVMCI is initialized. |
92 */ | 82 */ |
93 static OptionValuesTable* parse_arguments(); | 83 static void save_options(const char* options); |
94 | |
95 static bool parse_argument(OptionValuesTable* options, const char* arg); | |
96 | |
97 static void set_options(OptionValuesTable* options, TRAPS); | |
98 | 84 |
99 /** | 85 /** |
100 * Ensures that the JVMCI class loader is initialized and the well known JVMCI classes are loaded. | 86 * Ensures that the JVMCI class loader is initialized and the well known JVMCI classes are loaded. |
101 */ | 87 */ |
102 static void ensure_jvmci_class_loader_is_initialized(); | 88 static void ensure_jvmci_class_loader_is_initialized(); |
117 initialize_JVMCI(); | 103 initialize_JVMCI(); |
118 assert(_HotSpotJVMCIRuntime_initialized, "must be"); | 104 assert(_HotSpotJVMCIRuntime_initialized, "must be"); |
119 return _HotSpotJVMCIRuntime_instance; | 105 return _HotSpotJVMCIRuntime_instance; |
120 } | 106 } |
121 | 107 |
122 static Handle callInitializer(const char* className, const char* methodName, const char* returnType); | 108 static Handle callInitializer(const char* className, const char* methodName, const char* returnType, JavaCallArguments* args = NULL); |
123 | 109 |
124 /** | 110 /** |
125 * Trigger initialization of HotSpotJVMCIRuntime through JVMCI.getRuntime() | 111 * Trigger initialization of HotSpotJVMCIRuntime through JVMCI.getRuntime() |
126 */ | 112 */ |
127 static void initialize_JVMCI(); | 113 static void initialize_JVMCI(); |