8340119: Remove oopDesc::size_might_change()
Reviewed-by: stefank, iwalulya
This commit is contained in:
parent
10050a7239
commit
7834662ca3
@ -218,14 +218,3 @@ void oopDesc::release_float_field_put(int offset, jfloat value) { Atomic::
|
||||
|
||||
jdouble oopDesc::double_field_acquire(int offset) const { return Atomic::load_acquire(field_addr<jdouble>(offset)); }
|
||||
void oopDesc::release_double_field_put(int offset, jdouble value) { Atomic::release_store(field_addr<jdouble>(offset), value); }
|
||||
|
||||
#ifdef ASSERT
|
||||
bool oopDesc::size_might_change() {
|
||||
// UseParallelGC and UseG1GC can change the length field
|
||||
// of an "old copy" of an object array in the young gen so it indicates
|
||||
// the grey portion of an already copied array. This will cause the first
|
||||
// disjunct below to fail if the two comparands are computed across such
|
||||
// a concurrent change.
|
||||
return Universe::heap()->is_stw_gc_active() && is_objArray() && is_forwarded() && (UseParallelGC || UseG1GC);
|
||||
}
|
||||
#endif
|
||||
|
@ -319,8 +319,6 @@ class oopDesc {
|
||||
|
||||
// for error reporting
|
||||
static void* load_oop_raw(oop obj, int offset);
|
||||
|
||||
DEBUG_ONLY(bool size_might_change();)
|
||||
};
|
||||
|
||||
// An oopDesc is not initialized via a constructor. Space is allocated in
|
||||
|
@ -190,7 +190,7 @@ size_t oopDesc::size_given_klass(Klass* klass) {
|
||||
// skipping the intermediate round to HeapWordSize.
|
||||
s = align_up(size_in_bytes, MinObjAlignmentInBytes) / HeapWordSize;
|
||||
|
||||
assert(s == klass->oop_size(this) || size_might_change(), "wrong array object size");
|
||||
assert(s == klass->oop_size(this), "wrong array object size");
|
||||
} else {
|
||||
// Must be zero, so bite the bullet and take the virtual call.
|
||||
s = klass->oop_size(this);
|
||||
|
Loading…
Reference in New Issue
Block a user