Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalEnv.hpp @ 19321:98592ae4b1fa
only record method dependencies if JVMTI hotswapping or breakpointing is enabled
don't verify dependencies if the SystemDictionary was not updated during compilation
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 12 Feb 2015 16:54:12 +0100 |
parents | cd22c8dbda4f |
children | dd8989d5547f |
comparison
equal
deleted
inserted
replaced
19320:49605c649beb | 19321:98592ae4b1fa |
---|---|
48 Thread* THREAD = thread; | 48 Thread* THREAD = thread; |
49 | 49 |
50 // | 50 // |
51 // This class is the top level broker for requests from the compiler | 51 // This class is the top level broker for requests from the compiler |
52 // to the VM. | 52 // to the VM. |
53 class GraalEnv : AllStatic { | 53 class GraalEnv : StackObj { |
54 CI_PACKAGE_ACCESS_TO | 54 CI_PACKAGE_ACCESS_TO |
55 | 55 |
56 friend class CompileBroker; | 56 friend class CompileBroker; |
57 friend class Dependencies; // for get_object, during logging | 57 friend class Dependencies; // for get_object, during logging |
58 | 58 |
90 int field_index); | 90 int field_index); |
91 static methodHandle get_method_by_index(constantPoolHandle& cpool, | 91 static methodHandle get_method_by_index(constantPoolHandle& cpool, |
92 int method_index, Bytecodes::Code bc, | 92 int method_index, Bytecodes::Code bc, |
93 instanceKlassHandle& loading_klass); | 93 instanceKlassHandle& loading_klass); |
94 | 94 |
95 GraalEnv(CompileTask* task, int system_dictionary_modification_counter); | |
96 | |
95 private: | 97 private: |
98 CompileTask* _task; | |
99 int _system_dictionary_modification_counter; | |
100 | |
101 // Cache JVMTI state | |
102 bool _jvmti_can_hotswap_or_post_breakpoint; | |
103 bool _jvmti_can_access_local_variables; | |
104 bool _jvmti_can_post_on_exceptions; | |
96 | 105 |
97 // Implementation methods for loading and constant pool access. | 106 // Implementation methods for loading and constant pool access. |
98 static KlassHandle get_klass_by_name_impl(KlassHandle& accessing_klass, | 107 static KlassHandle get_klass_by_name_impl(KlassHandle& accessing_klass, |
99 constantPoolHandle& cpool, | 108 constantPoolHandle& cpool, |
100 Symbol* klass_name, | 109 Symbol* klass_name, |
122 // Is this thread currently in the VM state? | 131 // Is this thread currently in the VM state? |
123 static bool is_in_vm(); | 132 static bool is_in_vm(); |
124 | 133 |
125 // Helper routine for determining the validity of a compilation | 134 // Helper routine for determining the validity of a compilation |
126 // with respect to concurrent class loading. | 135 // with respect to concurrent class loading. |
127 static bool check_for_system_dictionary_modification(Dependencies* target); | 136 static bool check_for_system_dictionary_modification(Dependencies* target, GraalEnv* env); |
128 | 137 |
129 public: | 138 public: |
139 CompileTask* task() { return _task; } | |
140 | |
130 // Register the result of a compilation. | 141 // Register the result of a compilation. |
131 static GraalEnv::CodeInstallResult register_method( | 142 static GraalEnv::CodeInstallResult register_method( |
132 methodHandle& target, | 143 methodHandle& target, |
133 nmethod*& nm, | 144 nmethod*& nm, |
134 int entry_bci, | 145 int entry_bci, |
139 OopMapSet* oop_map_set, | 150 OopMapSet* oop_map_set, |
140 ExceptionHandlerTable* handler_table, | 151 ExceptionHandlerTable* handler_table, |
141 AbstractCompiler* compiler, | 152 AbstractCompiler* compiler, |
142 DebugInformationRecorder* debug_info, | 153 DebugInformationRecorder* debug_info, |
143 Dependencies* dependencies, | 154 Dependencies* dependencies, |
144 CompileTask* task, | 155 GraalEnv* env, |
145 int compile_id, | 156 int compile_id, |
146 bool has_unsafe_access, | 157 bool has_unsafe_access, |
147 Handle installed_code, | 158 Handle installed_code, |
148 Handle speculation_log); | 159 Handle speculation_log); |
149 | 160 |