< prev index next >

src/share/vm/oops/instanceKlass.hpp

Print this page




1081 
1082   InstanceKlass* java_super() const {
1083     return (super() == NULL) ? NULL : cast(super());
1084   }
1085 
1086   // Sizing (in words)
1087   static int header_size()            { return sizeof(InstanceKlass)/wordSize; }
1088 
1089   static int size(int vtable_length, int itable_length,
1090                   int nonstatic_oop_map_size,
1091                   bool is_interface, bool is_anonymous, bool has_stored_fingerprint,
1092                   int java_fields, bool is_value_type) {
1093     return align_metadata_size(header_size() +
1094            vtable_length +
1095            itable_length +
1096            nonstatic_oop_map_size +
1097            (is_interface ? (int)sizeof(Klass*)/wordSize : 0) +
1098            (is_anonymous ? (int)sizeof(Klass*)/wordSize : 0) +
1099            (has_stored_fingerprint ? (int)sizeof(uint64_t*)/wordSize : 0) +
1100            (java_fields * (int)sizeof(Klass*)/wordSize) +
1101            (is_value_type ? (int)sizeof(Klass*) : 0));

1102   }
1103   int size() const                    { return size(vtable_length(),
1104                                                itable_length(),
1105                                                nonstatic_oop_map_size(),
1106                                                is_interface(),
1107                                                is_anonymous(),
1108                                                has_stored_fingerprint(),
1109                                                has_value_fields() ? java_fields_count() : 0,
1110                                                is_value());
1111   }
1112 #if INCLUDE_SERVICES
1113   virtual void collect_statistics(KlassSizeStats *sz) const;
1114 #endif
1115 
1116   intptr_t* start_of_itable()   const { return (intptr_t*)start_of_vtable() + vtable_length(); }
1117   intptr_t* end_of_itable()     const { return start_of_itable() + itable_length(); }
1118 
1119   int  itable_offset_in_words() const { return start_of_itable() - (intptr_t*)this; }
1120 
1121   address static_field_addr(int offset);




1081 
1082   InstanceKlass* java_super() const {
1083     return (super() == NULL) ? NULL : cast(super());
1084   }
1085 
1086   // Sizing (in words)
1087   static int header_size()            { return sizeof(InstanceKlass)/wordSize; }
1088 
1089   static int size(int vtable_length, int itable_length,
1090                   int nonstatic_oop_map_size,
1091                   bool is_interface, bool is_anonymous, bool has_stored_fingerprint,
1092                   int java_fields, bool is_value_type) {
1093     return align_metadata_size(header_size() +
1094            vtable_length +
1095            itable_length +
1096            nonstatic_oop_map_size +
1097            (is_interface ? (int)sizeof(Klass*)/wordSize : 0) +
1098            (is_anonymous ? (int)sizeof(Klass*)/wordSize : 0) +
1099            (has_stored_fingerprint ? (int)sizeof(uint64_t*)/wordSize : 0) +
1100            (java_fields * (int)sizeof(Klass*)/wordSize) +
1101            (is_value_type ? (int)sizeof(Klass*) : 0) +
1102            (is_value_type ? (int)sizeof(intptr_t)*2 : 0));
1103   }
1104   int size() const                    { return size(vtable_length(),
1105                                                itable_length(),
1106                                                nonstatic_oop_map_size(),
1107                                                is_interface(),
1108                                                is_anonymous(),
1109                                                has_stored_fingerprint(),
1110                                                has_value_fields() ? java_fields_count() : 0,
1111                                                is_value());
1112   }
1113 #if INCLUDE_SERVICES
1114   virtual void collect_statistics(KlassSizeStats *sz) const;
1115 #endif
1116 
1117   intptr_t* start_of_itable()   const { return (intptr_t*)start_of_vtable() + vtable_length(); }
1118   intptr_t* end_of_itable()     const { return start_of_itable() + itable_length(); }
1119 
1120   int  itable_offset_in_words() const { return start_of_itable() - (intptr_t*)this; }
1121 
1122   address static_field_addr(int offset);


< prev index next >