< prev index next >

src/hotspot/share/oops/instanceRefKlass.hpp

8211446: Replace oop_pc_follow_contents with oop_iterate and closure

44 // order of reachability. Reference objects eligible for notification                                                      
45 // are linked to the static pending_list in class java/lang/ref/Reference,                                                 
46 // and the pending list lock object in the same class is notified.                                                         
47 
48 
49 class InstanceRefKlass: public InstanceKlass {                                                                             
50   friend class InstanceKlass;                                                                                              
51  public:                                                                                                                   
52   static const KlassID ID = InstanceRefKlassID;                                                                            
53 
54  private:                                                                                                                  
55   InstanceRefKlass(const ClassFileParser& parser) : InstanceKlass(parser, InstanceKlass::_misc_kind_reference, ID) {}      
56 
57  public:                                                                                                                   
58   InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }                                      
59 
60   // GC specific object visitors                                                                                           
61   //                                                                                                                       
62 #if INCLUDE_PARALLELGC                                                                                                     
63   // Parallel Compact                                                                                                      
64   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);                                                          
65   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);                                                          
66 #endif                                                                                                                     
67 
68   // Oop fields (and metadata) iterators                                                                                   
69   //                                                                                                                       
70   // The InstanceRefKlass iterators also support reference processing.                                                     
71 
72 
73   // Forward iteration                                                                                                     
74   // Iterate over all oop fields and metadata.                                                                             
75   template <typename T, class OopClosureType>                                                                              
76   inline void oop_oop_iterate(oop obj, OopClosureType* closure);                                                           
77 
78   // Reverse iteration                                                                                                     
79   // Iterate over all oop fields and metadata.                                                                             
80   template <typename T, class OopClosureType>                                                                              
81   inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);                                                   
82 
83   // Bounded range iteration                                                                                               

44 // order of reachability. Reference objects eligible for notification
45 // are linked to the static pending_list in class java/lang/ref/Reference,
46 // and the pending list lock object in the same class is notified.
47 
48 
49 class InstanceRefKlass: public InstanceKlass {
50   friend class InstanceKlass;
51  public:
52   static const KlassID ID = InstanceRefKlassID;
53 
54  private:
55   InstanceRefKlass(const ClassFileParser& parser) : InstanceKlass(parser, InstanceKlass::_misc_kind_reference, ID) {}
56 
57  public:
58   InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
59 
60   // GC specific object visitors
61   //
62 #if INCLUDE_PARALLELGC
63   // Parallel Compact

64   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
65 #endif
66 
67   // Oop fields (and metadata) iterators
68   //
69   // The InstanceRefKlass iterators also support reference processing.
70 
71 
72   // Forward iteration
73   // Iterate over all oop fields and metadata.
74   template <typename T, class OopClosureType>
75   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
76 
77   // Reverse iteration
78   // Iterate over all oop fields and metadata.
79   template <typename T, class OopClosureType>
80   inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
81 
82   // Bounded range iteration
< prev index next >