< prev index next >

src/hotspot/share/oops/instanceMirrorKlass.hpp

8201436: Replace oop_ps_push_contents with oop_iterate and closure

74     // Cache the offset of the static fields in the Class instance                                                         
75     assert(_offset_of_static_fields == 0, "once");                                                                         
76     _offset_of_static_fields = InstanceMirrorKlass::cast(SystemDictionary::Class_klass())->size_helper() << LogHeapWordSize
77   }                                                                                                                        
78 
79   static int offset_of_static_fields() {                                                                                   
80     return _offset_of_static_fields;                                                                                       
81   }                                                                                                                        
82 
83   int compute_static_oop_field_count(oop obj);                                                                             
84 
85   // Given a Klass return the size of the instance                                                                         
86   int instance_size(Klass* k);                                                                                             
87 
88   // allocation                                                                                                            
89   instanceOop allocate_instance(Klass* k, TRAPS);                                                                          
90 
91   // GC specific object visitors                                                                                           
92   //                                                                                                                       
93 #if INCLUDE_PARALLELGC                                                                                                     
94   // Parallel Scavenge                                                                                                     
95   void oop_ps_push_contents(  oop obj, PSPromotionManager* pm);                                                            
96   // Parallel Compact                                                                                                      
97   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);                                                          
98   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);                                                          
99 #endif                                                                                                                     
100 
101   static void serialize_offsets(class SerializeClosure* f) NOT_CDS_RETURN;                                                 
102 
103   // Oop fields (and metadata) iterators                                                                                   
104   //                                                                                                                       
105   // The InstanceMirrorKlass iterators also visit the hidden Klass pointer.                                                
106 
107   // Iterate over the static fields.                                                                                       
108   template <typename T, class OopClosureType>                                                                              
109   inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure);                                                   
110 
111   // Forward iteration                                                                                                     
112   // Iterate over the oop fields and metadata.                                                                             
113   template <typename T, class OopClosureType>                                                                              
114   inline void oop_oop_iterate(oop obj, OopClosureType* closure);                                                           

74     // Cache the offset of the static fields in the Class instance
75     assert(_offset_of_static_fields == 0, "once");
76     _offset_of_static_fields = InstanceMirrorKlass::cast(SystemDictionary::Class_klass())->size_helper() << LogHeapWordSize
77   }
78 
79   static int offset_of_static_fields() {
80     return _offset_of_static_fields;
81   }
82 
83   int compute_static_oop_field_count(oop obj);
84 
85   // Given a Klass return the size of the instance
86   int instance_size(Klass* k);
87 
88   // allocation
89   instanceOop allocate_instance(Klass* k, TRAPS);
90 
91   // GC specific object visitors
92   //
93 #if INCLUDE_PARALLELGC


94   // Parallel Compact
95   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);
96   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
97 #endif
98 
99   static void serialize_offsets(class SerializeClosure* f) NOT_CDS_RETURN;
100 
101   // Oop fields (and metadata) iterators
102   //
103   // The InstanceMirrorKlass iterators also visit the hidden Klass pointer.
104 
105   // Iterate over the static fields.
106   template <typename T, class OopClosureType>
107   inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure);
108 
109   // Forward iteration
110   // Iterate over the oop fields and metadata.
111   template <typename T, class OopClosureType>
112   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
< prev index next >