< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page
rev 49911 : imported patch removeAllGCs


1160                                  Array<Method*>* methods);
1161   void static deallocate_interfaces(ClassLoaderData* loader_data,
1162                                     const Klass* super_klass,
1163                                     Array<Klass*>* local_interfaces,
1164                                     Array<Klass*>* transitive_interfaces);
1165 
1166   // The constant pool is on stack if any of the methods are executing or
1167   // referenced by handles.
1168   bool on_stack() const { return _constants->on_stack(); }
1169 
1170   // callbacks for actions during class unloading
1171   static void notify_unload_class(InstanceKlass* ik);
1172   static void release_C_heap_structures(InstanceKlass* ik);
1173 
1174   // Naming
1175   const char* signature_name() const;
1176   static Symbol* package_from_name(const Symbol* name, TRAPS);
1177 
1178   // GC specific object visitors
1179   //
1180 #if INCLUDE_ALL_GCS
1181   // Parallel Scavenge
1182   void oop_ps_push_contents(  oop obj, PSPromotionManager* pm);
1183   // Parallel Compact
1184   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);
1185   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
1186 #endif
1187 
1188   // Oop fields (and metadata) iterators
1189   //  [nv = true]  Use non-virtual calls to do_oop_nv.
1190   //  [nv = false] Use virtual calls to do_oop.
1191   //
1192   // The InstanceKlass iterators also visits the Object's klass.
1193 
1194   // Forward iteration
1195  public:
1196   // Iterate over all oop fields in the oop maps.
1197   template <bool nv, class OopClosureType>
1198   inline void oop_oop_iterate_oop_maps(oop obj, OopClosureType* closure);
1199 
1200  protected:
1201   // Iterate over all oop fields and metadata.
1202   template <bool nv, class OopClosureType>
1203   inline int oop_oop_iterate(oop obj, OopClosureType* closure);
1204 
1205  private:
1206   // Iterate over all oop fields in the oop maps.
1207   // Specialized for [T = oop] or [T = narrowOop].
1208   template <bool nv, typename T, class OopClosureType>
1209   inline void oop_oop_iterate_oop_maps_specialized(oop obj, OopClosureType* closure);
1210 
1211   // Iterate over all oop fields in one oop map.
1212   template <bool nv, typename T, class OopClosureType>
1213   inline void oop_oop_iterate_oop_map(OopMapBlock* map, oop obj, OopClosureType* closure);
1214 
1215 
1216   // Reverse iteration
1217 #if INCLUDE_ALL_GCS
1218  public:
1219   // Iterate over all oop fields in the oop maps.
1220   template <bool nv, class OopClosureType>
1221   inline void oop_oop_iterate_oop_maps_reverse(oop obj, OopClosureType* closure);
1222 
1223  protected:
1224   // Iterate over all oop fields and metadata.
1225   template <bool nv, class OopClosureType>
1226   inline int oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
1227 
1228  private:
1229   // Iterate over all oop fields in the oop maps.
1230   // Specialized for [T = oop] or [T = narrowOop].
1231   template <bool nv, typename T, class OopClosureType>
1232   inline void oop_oop_iterate_oop_maps_specialized_reverse(oop obj, OopClosureType* closure);
1233 
1234   // Iterate over all oop fields in one oop map.
1235   template <bool nv, typename T, class OopClosureType>
1236   inline void oop_oop_iterate_oop_map_reverse(OopMapBlock* map, oop obj, OopClosureType* closure);
1237 #endif


1247   // Iterate over all oop fields and metadata.
1248   template <bool nv, class OopClosureType>
1249   inline int oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
1250 
1251  private:
1252   // Iterate over all oop fields in the oop maps.
1253   // Specialized for [T = oop] or [T = narrowOop].
1254   template <bool nv, typename T, class OopClosureType>
1255   inline void oop_oop_iterate_oop_maps_specialized_bounded(oop obj, OopClosureType* closure, MemRegion mr);
1256 
1257   // Iterate over all oop fields in one oop map.
1258   template <bool nv, typename T, class OopClosureType>
1259   inline void oop_oop_iterate_oop_map_bounded(OopMapBlock* map, oop obj, OopClosureType* closure, MemRegion mr);
1260 
1261 
1262  public:
1263 
1264   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
1265   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
1266 
1267 #if INCLUDE_ALL_GCS
1268   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
1269   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
1270 #endif // INCLUDE_ALL_GCS
1271 
1272   u2 idnum_allocated_count() const      { return _idnum_allocated_count; }
1273 
1274 public:
1275   void set_in_error_state() {
1276     assert(DumpSharedSpaces, "only call this when dumping archive");
1277     _init_state = initialization_error;
1278   }
1279   bool check_sharing_error_state();
1280 
1281 private:
1282   // initialization state
1283 #ifdef ASSERT
1284   void set_init_state(ClassState state);
1285 #else
1286   void set_init_state(ClassState state) { _init_state = (u1)state; }
1287 #endif
1288   void set_rewritten()                  { _misc_flags |= _misc_rewritten; }
1289   void set_init_thread(Thread *thread)  { _init_thread = thread; }
1290 




1160                                  Array<Method*>* methods);
1161   void static deallocate_interfaces(ClassLoaderData* loader_data,
1162                                     const Klass* super_klass,
1163                                     Array<Klass*>* local_interfaces,
1164                                     Array<Klass*>* transitive_interfaces);
1165 
1166   // The constant pool is on stack if any of the methods are executing or
1167   // referenced by handles.
1168   bool on_stack() const { return _constants->on_stack(); }
1169 
1170   // callbacks for actions during class unloading
1171   static void notify_unload_class(InstanceKlass* ik);
1172   static void release_C_heap_structures(InstanceKlass* ik);
1173 
1174   // Naming
1175   const char* signature_name() const;
1176   static Symbol* package_from_name(const Symbol* name, TRAPS);
1177 
1178   // GC specific object visitors
1179   //
1180 #if INCLUDE_PARALLELGC
1181   // Parallel Scavenge
1182   void oop_ps_push_contents(  oop obj, PSPromotionManager* pm);
1183   // Parallel Compact
1184   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);
1185   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
1186 #endif
1187 
1188   // Oop fields (and metadata) iterators
1189   //  [nv = true]  Use non-virtual calls to do_oop_nv.
1190   //  [nv = false] Use virtual calls to do_oop.
1191   //
1192   // The InstanceKlass iterators also visits the Object's klass.
1193 
1194   // Forward iteration
1195  public:
1196   // Iterate over all oop fields in the oop maps.
1197   template <bool nv, class OopClosureType>
1198   inline void oop_oop_iterate_oop_maps(oop obj, OopClosureType* closure);
1199 
1200  protected:
1201   // Iterate over all oop fields and metadata.
1202   template <bool nv, class OopClosureType>
1203   inline int oop_oop_iterate(oop obj, OopClosureType* closure);
1204 
1205  private:
1206   // Iterate over all oop fields in the oop maps.
1207   // Specialized for [T = oop] or [T = narrowOop].
1208   template <bool nv, typename T, class OopClosureType>
1209   inline void oop_oop_iterate_oop_maps_specialized(oop obj, OopClosureType* closure);
1210 
1211   // Iterate over all oop fields in one oop map.
1212   template <bool nv, typename T, class OopClosureType>
1213   inline void oop_oop_iterate_oop_map(OopMapBlock* map, oop obj, OopClosureType* closure);
1214 
1215 
1216   // Reverse iteration
1217 #if INCLUDE_OOP_OOP_ITERATE_BACKWARDS
1218  public:
1219   // Iterate over all oop fields in the oop maps.
1220   template <bool nv, class OopClosureType>
1221   inline void oop_oop_iterate_oop_maps_reverse(oop obj, OopClosureType* closure);
1222 
1223  protected:
1224   // Iterate over all oop fields and metadata.
1225   template <bool nv, class OopClosureType>
1226   inline int oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
1227 
1228  private:
1229   // Iterate over all oop fields in the oop maps.
1230   // Specialized for [T = oop] or [T = narrowOop].
1231   template <bool nv, typename T, class OopClosureType>
1232   inline void oop_oop_iterate_oop_maps_specialized_reverse(oop obj, OopClosureType* closure);
1233 
1234   // Iterate over all oop fields in one oop map.
1235   template <bool nv, typename T, class OopClosureType>
1236   inline void oop_oop_iterate_oop_map_reverse(OopMapBlock* map, oop obj, OopClosureType* closure);
1237 #endif


1247   // Iterate over all oop fields and metadata.
1248   template <bool nv, class OopClosureType>
1249   inline int oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
1250 
1251  private:
1252   // Iterate over all oop fields in the oop maps.
1253   // Specialized for [T = oop] or [T = narrowOop].
1254   template <bool nv, typename T, class OopClosureType>
1255   inline void oop_oop_iterate_oop_maps_specialized_bounded(oop obj, OopClosureType* closure, MemRegion mr);
1256 
1257   // Iterate over all oop fields in one oop map.
1258   template <bool nv, typename T, class OopClosureType>
1259   inline void oop_oop_iterate_oop_map_bounded(OopMapBlock* map, oop obj, OopClosureType* closure, MemRegion mr);
1260 
1261 
1262  public:
1263 
1264   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
1265   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
1266 
1267 #if INCLUDE_OOP_OOP_ITERATE_BACKWARDS
1268   ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
1269   ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
1270 #endif
1271 
1272   u2 idnum_allocated_count() const      { return _idnum_allocated_count; }
1273 
1274 public:
1275   void set_in_error_state() {
1276     assert(DumpSharedSpaces, "only call this when dumping archive");
1277     _init_state = initialization_error;
1278   }
1279   bool check_sharing_error_state();
1280 
1281 private:
1282   // initialization state
1283 #ifdef ASSERT
1284   void set_init_state(ClassState state);
1285 #else
1286   void set_init_state(ClassState state) { _init_state = (u1)state; }
1287 #endif
1288   void set_rewritten()                  { _misc_flags |= _misc_rewritten; }
1289   void set_init_thread(Thread *thread)  { _init_thread = thread; }
1290 


< prev index next >