Mercurial > hg > truffle
comparison src/share/vm/graal/graalRuntime.hpp @ 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
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 23 May 2014 19:36:34 +0200 |
parents | b7fb36e57da8 |
children | 6aa352b260f4 |
comparison
equal
deleted
inserted
replaced
15869:387b15da0f68 | 15870:fe608a56e3f7 |
---|---|
29 #include "runtime/deoptimization.hpp" | 29 #include "runtime/deoptimization.hpp" |
30 | 30 |
31 class GraalRuntime: public CHeapObj<mtCompiler> { | 31 class GraalRuntime: public CHeapObj<mtCompiler> { |
32 private: | 32 private: |
33 | 33 |
34 static address _external_deopt_i2c_entry; | 34 static address _external_deopt_i2c_entry; |
35 | |
36 /** | |
37 * Reads the OptionValue object from a specified static field. | |
38 * | |
39 * @throws LinkageError if the field could not be resolved | |
40 */ | |
41 static Handle get_OptionValue(const char* declaringClass, const char* fieldName, const char* fieldSig, TRAPS); | |
42 | |
43 /** | |
44 * Parses the string form of a numeric, float or double option into a jlong (using raw bits for floats/doubles). | |
45 * | |
46 * @param spec 'i', 'f' or 'd' (see HotSpotOptions.setOption()) | |
47 * @param name name option option | |
48 * @param value string value to parse | |
49 * @throws InternalError if value could not be parsed according to spec | |
50 */ | |
51 static jlong parse_primitive_option_value(char spec, Handle name, const char* value, TRAPS); | |
52 | |
53 /** | |
54 * Loads default option value overrides from a <jre_home>/lib/graal.options if it exists. Each | |
55 * line in this file must have the format of a Graal command line option without the | |
56 * leading "-G:" prefix. These option values are set prior to processing of any Graal | |
57 * options present on the command line. | |
58 */ | |
59 static void parse_graal_options_file(KlassHandle hotSpotOptionsClass, TRAPS); | |
60 | |
61 /** | |
62 * Parses a given argument and sets the denoted Graal option. | |
63 * | |
64 * @throws InternalError if there was a problem parsing or setting the option | |
65 */ | |
66 static void parse_argument(KlassHandle hotSpotOptionsClass, char* arg, TRAPS); | |
67 | |
68 /** | |
69 * Searches for a Graal option denoted by a given name and sets it value. | |
70 * | |
71 * @returns true if the option was found | |
72 * @throws InternalError if there was a problem setting the option's value | |
73 */ | |
74 static bool set_option(KlassHandle hotSpotOptionsClass, const char* name, int name_len, Handle name_handle, const char* value, TRAPS); | |
35 | 75 |
36 public: | 76 public: |
37 | 77 |
38 static void initialize_natives(JNIEnv *env, jclass c2vmClass); | 78 static void initialize_natives(JNIEnv *env, jclass c2vmClass); |
39 static BufferBlob* initialize_buffer_blob(); | 79 static BufferBlob* initialize_buffer_blob(); |
80 | |
81 static bool parse_arguments(KlassHandle hotSpotOptionsClass, TRAPS); | |
82 | |
40 static BasicType kindToBasicType(jchar ch); | 83 static BasicType kindToBasicType(jchar ch); |
41 static address create_external_deopt_i2c(); | 84 static address create_external_deopt_i2c(); |
42 static address get_external_deopt_i2c_entry() {return _external_deopt_i2c_entry;} | 85 static address get_external_deopt_i2c_entry() {return _external_deopt_i2c_entry;} |
43 | 86 |
44 // The following routines are all called from compiled Graal code | 87 // The following routines are all called from compiled Graal code |