< prev index next >
src/hotspot/share/oops/oop.cpp
Print this page
*** 112,125 ****
}
// used only for asserts and guarantees
bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
if (!Universe::heap()->is_oop(obj)) {
! assert(obj->klass()->is_value(), "Only value type can be outside of the Java heap");
! VTBufferChunk* chunk = VTBufferChunk::chunk(obj);
! assert(chunk->is_valid(), "if not in the heap, should a buffered VT");
! if (!VTBuffer::is_in_vt_buffer(obj)) return false;
}
// Header verification: the mark is typically non-NULL. If we're
// at a safepoint, it must not be null.
// Outside of a safepoint, the header could be changing (for example,
--- 112,122 ----
}
// used only for asserts and guarantees
bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
if (!Universe::heap()->is_oop(obj)) {
! return false;
}
// Header verification: the mark is typically non-NULL. If we're
// at a safepoint, it must not be null.
// Outside of a safepoint, the header could be changing (for example,
*** 128,139 ****
return true;
}
if (obj->mark_raw() != NULL) {
return true;
}
! return !SafepointSynchronize::is_at_safepoint()
! || (obj->klass()->is_value() && VTBuffer::is_in_vt_buffer(obj)) ;
}
// used only for asserts and guarantees
bool oopDesc::is_oop_or_null(oop obj, bool ignore_mark_word) {
return obj == NULL ? true : is_oop(obj, ignore_mark_word);
--- 125,135 ----
return true;
}
if (obj->mark_raw() != NULL) {
return true;
}
! return !SafepointSynchronize::is_at_safepoint() ;
}
// used only for asserts and guarantees
bool oopDesc::is_oop_or_null(oop obj, bool ignore_mark_word) {
return obj == NULL ? true : is_oop(obj, ignore_mark_word);
< prev index next >