1246 1247 // Bounded range iteration 1248 public: 1249 // Iterate over all oop fields in the oop maps. 1250 template <typename T, class OopClosureType> 1251 inline void oop_oop_iterate_oop_maps_bounded(oop obj, OopClosureType* closure, MemRegion mr); 1252 1253 // Iterate over all oop fields and metadata. 1254 template <typename T, class OopClosureType> 1255 inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); 1256 1257 private: 1258 // Iterate over all oop fields in one oop map. 1259 template <typename T, class OopClosureType> 1260 inline void oop_oop_iterate_oop_map_bounded(OopMapBlock* map, oop obj, OopClosureType* closure, MemRegion mr); 1261 1262 1263 public: 1264 u2 idnum_allocated_count() const { return _idnum_allocated_count; } 1265 1266 public: 1267 void set_in_error_state() { 1268 assert(DumpSharedSpaces, "only call this when dumping archive"); 1269 _init_state = initialization_error; 1270 } 1271 1272 private: 1273 // initialization state 1274 void set_init_state(ClassState state); 1275 void set_rewritten() { _misc_flags |= _misc_rewritten; } 1276 void set_init_thread(Thread *thread) { _init_thread = thread; } 1277 1278 // The RedefineClasses() API can cause new method idnums to be needed 1279 // which will cause the caches to grow. Safety requires different 1280 // cache management logic if the caches can grow instead of just 1281 // going from NULL to non-NULL. 1282 bool idnum_can_increment() const { return has_been_redefined(); } 1283 inline jmethodID* methods_jmethod_ids_acquire() const; 1284 inline void release_set_methods_jmethod_ids(jmethodID* jmeths); 1285 1286 // Lock during initialization 1287 public: 1288 // Lock for (1) initialization; (2) access to the ConstantPool of this class. 1289 // Must be one per class and it has to be a VM internal object so java code 1290 // cannot lock it (like the mirror). 1291 // It has to be an object not a Mutex because it's held through java calls. | 1246 1247 // Bounded range iteration 1248 public: 1249 // Iterate over all oop fields in the oop maps. 1250 template <typename T, class OopClosureType> 1251 inline void oop_oop_iterate_oop_maps_bounded(oop obj, OopClosureType* closure, MemRegion mr); 1252 1253 // Iterate over all oop fields and metadata. 1254 template <typename T, class OopClosureType> 1255 inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); 1256 1257 private: 1258 // Iterate over all oop fields in one oop map. 1259 template <typename T, class OopClosureType> 1260 inline void oop_oop_iterate_oop_map_bounded(OopMapBlock* map, oop obj, OopClosureType* closure, MemRegion mr); 1261 1262 1263 public: 1264 u2 idnum_allocated_count() const { return _idnum_allocated_count; } 1265 1266 private: 1267 // initialization state 1268 void set_init_state(ClassState state); 1269 void set_rewritten() { _misc_flags |= _misc_rewritten; } 1270 void set_init_thread(Thread *thread) { _init_thread = thread; } 1271 1272 // The RedefineClasses() API can cause new method idnums to be needed 1273 // which will cause the caches to grow. Safety requires different 1274 // cache management logic if the caches can grow instead of just 1275 // going from NULL to non-NULL. 1276 bool idnum_can_increment() const { return has_been_redefined(); } 1277 inline jmethodID* methods_jmethod_ids_acquire() const; 1278 inline void release_set_methods_jmethod_ids(jmethodID* jmeths); 1279 1280 // Lock during initialization 1281 public: 1282 // Lock for (1) initialization; (2) access to the ConstantPool of this class. 1283 // Must be one per class and it has to be a VM internal object so java code 1284 // cannot lock it (like the mirror). 1285 // It has to be an object not a Mutex because it's held through java calls. |