176 static uint64_t _redefinition_count;
177 friend class VM_RedefineClasses;
178 inline static void increment_redefinition_count() {
179 JVMTI_ONLY(_redefinition_count++;)
180 }
181 // Flag to indicate if the compiler has recorded all dependencies. When the
182 // can_redefine_classes capability is enabled in the OnLoad phase then the compiler
183 // records all dependencies from startup. However if the capability is first
184 // enabled some time later then the dependencies recorded by the compiler
185 // are incomplete. This flag is used by RedefineClasses to know if the
186 // dependency information is complete or not.
187 static bool _all_dependencies_are_recorded;
188
189 public:
190 inline static bool has_redefined_a_class() {
191 JVMTI_ONLY(return _redefinition_count != 0);
192 NOT_JVMTI(return false);
193 }
194
195 // Only set in safepoint, so no memory ordering needed.
196 inline static uint64_t redefinition_count() { return _redefinition_count; }
197
198 inline static bool all_dependencies_are_recorded() {
199 return _all_dependencies_are_recorded;
200 }
201
202 inline static void set_all_dependencies_are_recorded(bool on) {
203 _all_dependencies_are_recorded = (on != 0);
204 }
205
206 // Add read edges to the unnamed modules of the bootstrap and app class loaders
207 static void add_default_read_edges(Handle h_module, TRAPS) NOT_JVMTI_RETURN;
208
209 // Add a read edge to the module
210 static jvmtiError add_module_reads(Handle module, Handle to_module, TRAPS);
211
212 // Updates a module to export a package
213 static jvmtiError add_module_exports(Handle module, Handle pkg_name, Handle to_module, TRAPS);
214
215 // Updates a module to open a package
216 static jvmtiError add_module_opens(Handle module, Handle pkg_name, Handle to_module, TRAPS);
|
176 static uint64_t _redefinition_count;
177 friend class VM_RedefineClasses;
178 inline static void increment_redefinition_count() {
179 JVMTI_ONLY(_redefinition_count++;)
180 }
181 // Flag to indicate if the compiler has recorded all dependencies. When the
182 // can_redefine_classes capability is enabled in the OnLoad phase then the compiler
183 // records all dependencies from startup. However if the capability is first
184 // enabled some time later then the dependencies recorded by the compiler
185 // are incomplete. This flag is used by RedefineClasses to know if the
186 // dependency information is complete or not.
187 static bool _all_dependencies_are_recorded;
188
189 public:
190 inline static bool has_redefined_a_class() {
191 JVMTI_ONLY(return _redefinition_count != 0);
192 NOT_JVMTI(return false);
193 }
194
195 // Only set in safepoint, so no memory ordering needed.
196 inline static uint64_t redefinition_count() {
197 JVMTI_ONLY(return _redefinition_count);
198 NOT_JVMTI(return 0);
199 }
200
201 inline static bool all_dependencies_are_recorded() {
202 return _all_dependencies_are_recorded;
203 }
204
205 inline static void set_all_dependencies_are_recorded(bool on) {
206 _all_dependencies_are_recorded = (on != 0);
207 }
208
209 // Add read edges to the unnamed modules of the bootstrap and app class loaders
210 static void add_default_read_edges(Handle h_module, TRAPS) NOT_JVMTI_RETURN;
211
212 // Add a read edge to the module
213 static jvmtiError add_module_reads(Handle module, Handle to_module, TRAPS);
214
215 // Updates a module to export a package
216 static jvmtiError add_module_exports(Handle module, Handle pkg_name, Handle to_module, TRAPS);
217
218 // Updates a module to open a package
219 static jvmtiError add_module_opens(Handle module, Handle pkg_name, Handle to_module, TRAPS);
|