Skip to content

Commit 7834662

Browse files
author
Thomas Schatzl
committed
8340119: Remove oopDesc::size_might_change()
Reviewed-by: stefank, iwalulya
1 parent 10050a7 commit 7834662

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

src/hotspot/share/oops/oop.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,3 @@ void oopDesc::release_float_field_put(int offset, jfloat value) { Atomic::
218218

219219
jdouble oopDesc::double_field_acquire(int offset) const { return Atomic::load_acquire(field_addr<jdouble>(offset)); }
220220
void oopDesc::release_double_field_put(int offset, jdouble value) { Atomic::release_store(field_addr<jdouble>(offset), value); }
221-
222-
#ifdef ASSERT
223-
bool oopDesc::size_might_change() {
224-
// UseParallelGC and UseG1GC can change the length field
225-
// of an "old copy" of an object array in the young gen so it indicates
226-
// the grey portion of an already copied array. This will cause the first
227-
// disjunct below to fail if the two comparands are computed across such
228-
// a concurrent change.
229-
return Universe::heap()->is_stw_gc_active() && is_objArray() && is_forwarded() && (UseParallelGC || UseG1GC);
230-
}
231-
#endif

src/hotspot/share/oops/oop.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ class oopDesc {
319319

320320
// for error reporting
321321
static void* load_oop_raw(oop obj, int offset);
322-
323-
DEBUG_ONLY(bool size_might_change();)
324322
};
325323

326324
// An oopDesc is not initialized via a constructor. Space is allocated in

src/hotspot/share/oops/oop.inline.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ size_t oopDesc::size_given_klass(Klass* klass) {
190190
// skipping the intermediate round to HeapWordSize.
191191
s = align_up(size_in_bytes, MinObjAlignmentInBytes) / HeapWordSize;
192192

193-
assert(s == klass->oop_size(this) || size_might_change(), "wrong array object size");
193+
assert(s == klass->oop_size(this), "wrong array object size");
194194
} else {
195195
// Must be zero, so bite the bullet and take the virtual call.
196196
s = klass->oop_size(this);

0 commit comments

Comments
 (0)