src/share/vm/oops/instanceKlass.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/oops/instanceKlass.hpp
src/share/vm/oops/instanceKlass.hpp
Print this page
*** 52,61 ****
--- 52,62 ----
// [EMBEDDED nonstatic oop-map blocks] size in words = nonstatic_oop_map_size
// The embedded nonstatic oop-map blocks are short pairs (offset, length)
// indicating where oops are located in instances of this klass.
// [EMBEDDED implementor of the interface] only exist for interface
// [EMBEDDED host klass ] only exist for an anonymous class (JSR 292 enabled)
+ // [EMBEDDED fingerprint ] only if should_store_fingerprint()==true
// forward declaration for class -- see below for definition
#if INCLUDE_JVMTI
class BreakpointInfo;
*** 213,226 ****
_misc_is_anonymous = 1 << 5, // has embedded _host_klass field
_misc_is_contended = 1 << 6, // marked with contended annotation
_misc_has_nonstatic_concrete_methods = 1 << 7, // class/superclass/implemented interfaces has non-static, concrete methods
_misc_declares_nonstatic_concrete_methods = 1 << 8, // directly declares non-static, concrete methods
_misc_has_been_redefined = 1 << 9, // class has been redefined
! _misc_is_scratch_class = 1 << 10, // class is the redefined scratch class
! _misc_is_shared_boot_class = 1 << 11, // defining class loader is boot class loader
! _misc_is_shared_platform_class = 1 << 12, // defining class loader is platform class loader
! _misc_is_shared_app_class = 1 << 13 // defining class loader is app class loader
};
u2 loader_type_bits() {
return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class;
}
u2 _misc_flags;
--- 214,229 ----
_misc_is_anonymous = 1 << 5, // has embedded _host_klass field
_misc_is_contended = 1 << 6, // marked with contended annotation
_misc_has_nonstatic_concrete_methods = 1 << 7, // class/superclass/implemented interfaces has non-static, concrete methods
_misc_declares_nonstatic_concrete_methods = 1 << 8, // directly declares non-static, concrete methods
_misc_has_been_redefined = 1 << 9, // class has been redefined
! _misc_has_passed_fingerprint_check = 1 << 10, // when this class was loaded, the fingerprint computed from its
! // code source was found to be matching the value recorded by AOT.
! _misc_is_scratch_class = 1 << 11, // class is the redefined scratch class
! _misc_is_shared_boot_class = 1 << 12, // defining class loader is boot class loader
! _misc_is_shared_platform_class = 1 << 13, // defining class loader is platform class loader
! _misc_is_shared_app_class = 1 << 14 // defining class loader is app class loader
};
u2 loader_type_bits() {
return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class;
}
u2 _misc_flags;
*** 730,739 ****
--- 733,759 ----
}
void set_has_been_redefined() {
_misc_flags |= _misc_has_been_redefined;
}
+ bool has_passed_fingerprint_check() const {
+ return (_misc_flags & _misc_has_passed_fingerprint_check) != 0;
+ }
+ void set_has_passed_fingerprint_check(bool b) {
+ if (b) {
+ _misc_flags |= _misc_has_passed_fingerprint_check;
+ } else {
+ _misc_flags &= ~_misc_has_passed_fingerprint_check;
+ }
+ }
+ bool supers_have_passed_fingerprint_checks();
+
+ static bool should_store_fingerprint();
+ bool has_stored_fingerprint() const;
+ uint64_t get_stored_fingerprint() const;
+ void store_fingerprint(uint64_t fingerprint);
+
bool is_scratch_class() const {
return (_misc_flags & _misc_is_scratch_class) != 0;
}
void set_is_scratch_class() {
*** 1026,1048 ****
// Sizing (in words)
static int header_size() { return sizeof(InstanceKlass)/wordSize; }
static int size(int vtable_length, int itable_length,
int nonstatic_oop_map_size,
! bool is_interface, bool is_anonymous) {
return align_metadata_size(header_size() +
vtable_length +
itable_length +
nonstatic_oop_map_size +
(is_interface ? (int)sizeof(Klass*)/wordSize : 0) +
! (is_anonymous ? (int)sizeof(Klass*)/wordSize : 0));
}
int size() const { return size(vtable_length(),
itable_length(),
nonstatic_oop_map_size(),
is_interface(),
! is_anonymous());
}
#if INCLUDE_SERVICES
virtual void collect_statistics(KlassSizeStats *sz) const;
#endif
--- 1046,1070 ----
// Sizing (in words)
static int header_size() { return sizeof(InstanceKlass)/wordSize; }
static int size(int vtable_length, int itable_length,
int nonstatic_oop_map_size,
! bool is_interface, bool is_anonymous, bool has_stored_fingerprint) {
return align_metadata_size(header_size() +
vtable_length +
itable_length +
nonstatic_oop_map_size +
(is_interface ? (int)sizeof(Klass*)/wordSize : 0) +
! (is_anonymous ? (int)sizeof(Klass*)/wordSize : 0) +
! (has_stored_fingerprint ? (int)sizeof(uint64_t*)/wordSize : 0));
}
int size() const { return size(vtable_length(),
itable_length(),
nonstatic_oop_map_size(),
is_interface(),
! is_anonymous(),
! has_stored_fingerprint());
}
#if INCLUDE_SERVICES
virtual void collect_statistics(KlassSizeStats *sz) const;
#endif
*** 1081,1090 ****
--- 1103,1130 ----
} else {
return NULL;
}
}
+ address adr_fingerprint() const {
+ if (has_stored_fingerprint()) {
+ InstanceKlass** adr_host = adr_host_klass();
+ if (adr_host != NULL) {
+ return (address)(adr_host + 1);
+ }
+
+ Klass** adr_impl = adr_implementor();
+ if (adr_impl != NULL) {
+ return (address)(adr_impl + 1);
+ }
+
+ return (address)end_of_nonstatic_oop_maps();
+ } else {
+ return NULL;
+ }
+ }
+
// Use this to return the size of an instance in heap words:
int size_helper() const {
return layout_helper_to_size_helper(layout_helper());
}
src/share/vm/oops/instanceKlass.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File