< prev index next >
src/share/vm/oops/oop.inline.hpp
Print this page
@@ -29,10 +29,11 @@
#include "gc/shared/barrierSet.inline.hpp"
#include "gc/shared/cardTableModRefBS.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
#include "gc/shared/genCollectedHeap.hpp"
#include "gc/shared/generation.hpp"
+#include "memory/vtBuffer.hpp"
#include "oops/arrayKlass.hpp"
#include "oops/arrayOop.hpp"
#include "oops/klass.inline.hpp"
#include "oops/markOop.inline.hpp"
#include "oops/oop.hpp"
@@ -545,11 +546,16 @@
// used only for asserts
bool oopDesc::is_oop(bool ignore_mark_word) const {
oop obj = (oop) this;
if (!check_obj_alignment(obj)) return false;
- if (!Universe::heap()->is_in_reserved(obj)) return false;
+ if (!Universe::heap()->is_in_reserved(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;
+ }
// obj is aligned and accessible in heap
if (Universe::heap()->is_in_reserved(obj->klass_or_null())) return false;
// Header verification: the mark is typically non-NULL. If we're
// at a safepoint, it must not be null.
@@ -559,11 +565,12 @@
return true;
}
if (mark() != NULL) {
return true;
}
- return !SafepointSynchronize::is_at_safepoint();
+ return !SafepointSynchronize::is_at_safepoint()
+ || (obj->klass()->is_value() && !Universe::heap()->is_in_reserved(obj)) ;
}
// used only for asserts
bool oopDesc::is_oop_or_null(bool ignore_mark_word) const {
< prev index next >