< prev index next >

src/hotspot/share/oops/instanceMirrorKlass.hpp

8211447: Replace oop_pc_update_pointers with oop_iterate and closure

71   }                                                                                                                        
72 
73   static void init_offset_of_static_fields() {                                                                             
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_update_pointers(oop obj, ParCompactionManager* cm);                                                          
96 #endif                                                                                                                     
97                                                                                                                            
98   static void serialize_offsets(class SerializeClosure* f) NOT_CDS_RETURN;                                                 
99 
100   // Oop fields (and metadata) iterators                                                                                   
101   //                                                                                                                       
102   // The InstanceMirrorKlass iterators also visit the hidden Klass pointer.                                                
103 
104   // Iterate over the static fields.                                                                                       
105   template <typename T, class OopClosureType>                                                                              
106   inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure);                                                   
107 
108   // Forward iteration                                                                                                     
109   // Iterate over the oop fields and metadata.                                                                             
110   template <typename T, class OopClosureType>                                                                              
111   inline void oop_oop_iterate(oop obj, OopClosureType* closure);                                                           
112 
113   // Reverse iteration                                                                                                     
114   // Iterate over the oop fields and metadata.                                                                             
115   template <typename T, class OopClosureType>                                                                              
116   inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);                                                   

71   }
72 
73   static void init_offset_of_static_fields() {
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   static void serialize_offsets(class SerializeClosure* f) NOT_CDS_RETURN;
92 
93   // Oop fields (and metadata) iterators
94   //
95   // The InstanceMirrorKlass iterators also visit the hidden Klass pointer.
96 
97   // Iterate over the static fields.
98   template <typename T, class OopClosureType>
99   inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure);
100 
101   // Forward iteration
102   // Iterate over the oop fields and metadata.
103   template <typename T, class OopClosureType>
104   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
105 
106   // Reverse iteration
107   // Iterate over the oop fields and metadata.
108   template <typename T, class OopClosureType>
109   inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
< prev index next >