mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-18 01:17:57 +00:00
6860920: serialize.cpp shouldn't use objArrayOopDesc::base_offset_in_bytes(T_BYTE)
Serialize.cpp currently uses objArrayOopDesc::base_offset_in_bytes(T_BYTE), which seems to be wrong. Reviewed-by: coleenp, kvn
This commit is contained in:
parent
7229ae9b95
commit
6b849a12a0
@ -51,7 +51,7 @@ void CompactingPermGenGen::serialize_oops(SerializeOopClosure* soc) {
|
||||
soc->do_tag(arrayOopDesc::base_offset_in_bytes(T_BYTE));
|
||||
soc->do_tag(sizeof(constantPoolOopDesc));
|
||||
soc->do_tag(sizeof(constantPoolCacheOopDesc));
|
||||
soc->do_tag(objArrayOopDesc::base_offset_in_bytes(T_BYTE));
|
||||
soc->do_tag(objArrayOopDesc::base_offset_in_bytes());
|
||||
soc->do_tag(typeArrayOopDesc::base_offset_in_bytes(T_BYTE));
|
||||
soc->do_tag(sizeof(symbolOopDesc));
|
||||
soc->do_tag(sizeof(klassOopDesc));
|
||||
|
||||
@ -38,6 +38,11 @@ class objArrayOopDesc : public arrayOopDesc {
|
||||
}
|
||||
|
||||
public:
|
||||
// Returns the offset of the first element.
|
||||
static int base_offset_in_bytes() {
|
||||
return arrayOopDesc::base_offset_in_bytes(T_OBJECT);
|
||||
}
|
||||
|
||||
// base is the address following the header.
|
||||
HeapWord* base() const { return (HeapWord*) arrayOopDesc::base(T_OBJECT); }
|
||||
|
||||
|
||||
@ -2074,7 +2074,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
|
||||
|
||||
// See if it is a narrow oop array.
|
||||
if (adr_type->isa_aryptr()) {
|
||||
if (adr_type->offset() >= objArrayOopDesc::base_offset_in_bytes(type)) {
|
||||
if (adr_type->offset() >= objArrayOopDesc::base_offset_in_bytes()) {
|
||||
const TypeOopPtr *elem_type = adr_type->is_aryptr()->elem()->isa_oopptr();
|
||||
if (elem_type != NULL) {
|
||||
sharpened_klass = elem_type->klass();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user