8231113: Remove CollectedHeap::check_oop_location()
Reviewed-by: stefank, eosterlund, tschatzl
This commit is contained in:
parent
35a9f6864a
commit
b053f09769
src/hotspot/share
@ -135,10 +135,6 @@ private:
|
||||
bool should_do_concurrent_full_gc(GCCause::Cause cause);
|
||||
|
||||
void collect_mostly_concurrent(GCCause::Cause cause);
|
||||
|
||||
// CMS forwards some non-heap value into the mark oop to reserve oops during
|
||||
// promotion, so we can't assert about obj alignment or that the forwardee is in heap
|
||||
virtual void check_oop_location(void* addr) const {}
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_CMS_CMSHEAP_HPP
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "oops/oopsHierarchy.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/prefetch.inline.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
|
||||
template <class T>
|
||||
inline void G1ScanClosureBase::prefetch_and_push(T* p, const oop obj) {
|
||||
@ -115,7 +116,8 @@ inline static void check_obj_during_refinement(T* p, oop const obj) {
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
// can't do because of races
|
||||
// assert(oopDesc::is_oop_or_null(obj), "expected an oop");
|
||||
g1h->check_oop_location(obj);
|
||||
assert(is_object_aligned(obj), "oop must be aligned");
|
||||
assert(g1h->is_in_reserved(obj), "oop must be in reserved");
|
||||
|
||||
HeapRegion* from = g1h->heap_region_containing(p);
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "oops/access.inline.hpp"
|
||||
#include "oops/compressedOops.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/stack.inline.hpp"
|
||||
|
||||
inline void MarkSweep::mark_object(oop obj) {
|
||||
@ -87,7 +88,7 @@ template <class T> inline void MarkSweep::adjust_pointer(T* p) {
|
||||
"should be forwarded");
|
||||
|
||||
if (new_obj != NULL) {
|
||||
DEBUG_ONLY(Universe::heap()->check_oop_location((HeapWord*)new_obj);)
|
||||
assert(is_object_aligned(new_obj), "oop must be aligned");
|
||||
RawAccess<IS_NOT_NULL>::oop_store(p, new_obj);
|
||||
}
|
||||
}
|
||||
|
@ -343,11 +343,6 @@ void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t siz
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
void CollectedHeap::check_oop_location(void* addr) const {
|
||||
assert(is_object_aligned(addr), "address is not aligned");
|
||||
assert(_reserved.contains(addr), "address is not in reserved heap");
|
||||
}
|
||||
|
||||
size_t CollectedHeap::max_tlab_size() const {
|
||||
// TLABs can't be bigger than we can fill with a int[Integer.MAX_VALUE].
|
||||
// This restriction could be removed by enabling filling with multiple arrays.
|
||||
@ -376,8 +371,6 @@ void CollectedHeap::fill_args_check(HeapWord* start, size_t words)
|
||||
{
|
||||
assert(words >= min_fill_size(), "too small to fill");
|
||||
assert(is_object_aligned(words), "unaligned size");
|
||||
DEBUG_ONLY(Universe::heap()->check_oop_location(start);)
|
||||
DEBUG_ONLY(Universe::heap()->check_oop_location(start + words - MinObjAlignment);)
|
||||
}
|
||||
|
||||
void CollectedHeap::zap_filler_array(HeapWord* start, size_t words, bool zap)
|
||||
|
@ -233,11 +233,6 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||
|
||||
DEBUG_ONLY(bool is_in_or_null(const void* p) const { return p == NULL || is_in(p); })
|
||||
|
||||
// This function verifies that "addr" is a valid oop location, w.r.t. heap
|
||||
// datastructures such as bitmaps and virtual memory address. It does *not*
|
||||
// check if the location is within committed heap memory.
|
||||
virtual void check_oop_location(void* addr) const;
|
||||
|
||||
virtual uint32_t hash_oop(oop obj) const;
|
||||
|
||||
void set_gc_cause(GCCause::Cause v) {
|
||||
|
@ -368,11 +368,3 @@ void ZCollectedHeap::verify(VerifyOption option /* ignored */) {
|
||||
bool ZCollectedHeap::is_oop(oop object) const {
|
||||
return CollectedHeap::is_oop(object) && _heap.is_oop(object);
|
||||
}
|
||||
|
||||
void ZCollectedHeap::check_oop_location(void* addr) const {
|
||||
assert(is_object_aligned(addr), "address is not aligned");
|
||||
|
||||
const uintptr_t addr_int = reinterpret_cast<uintptr_t>(addr);
|
||||
assert(addr_int >= ZAddressSpaceStart, "address is outside of the heap");
|
||||
assert(addr_int < ZAddressSpaceEnd, "address is outside of the heap");
|
||||
}
|
||||
|
@ -126,7 +126,6 @@ public:
|
||||
virtual void prepare_for_verify();
|
||||
virtual void verify(VerifyOption option /* ignored */);
|
||||
virtual bool is_oop(oop object) const;
|
||||
virtual void check_oop_location(void* addr) const;
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_Z_ZCOLLECTEDHEAP_HPP
|
||||
|
@ -58,7 +58,8 @@ inline oop CompressedOops::decode(narrowOop v) {
|
||||
|
||||
inline narrowOop CompressedOops::encode_not_null(oop v) {
|
||||
assert(!is_null(v), "oop value can never be zero");
|
||||
DEBUG_ONLY(Universe::heap()->check_oop_location(v);)
|
||||
assert(is_object_aligned(v), "address not aligned: " PTR_FORMAT, p2i((void*)v));
|
||||
assert(is_in(v), "address not in heap range: " PTR_FORMAT, p2i((void*)v));
|
||||
uint64_t pd = (uint64_t)(pointer_delta((void*)v, (void*)base(), 1));
|
||||
assert(OopEncodingHeapMax > pd, "change encoding max if new encoding");
|
||||
uint64_t result = pd >> shift();
|
||||
|
@ -209,7 +209,6 @@ void oopDesc::release_double_field_put(int offset, jdouble value) { HeapAcce
|
||||
|
||||
#ifdef ASSERT
|
||||
void oopDesc::verify_forwardee(oop forwardee) {
|
||||
Universe::heap()->check_oop_location(forwardee);
|
||||
#if INCLUDE_CDS_JAVA_HEAP
|
||||
assert(!HeapShared::is_archived_object(forwardee) && !HeapShared::is_archived_object(this),
|
||||
"forwarding archive object");
|
||||
|
Loading…
x
Reference in New Issue
Block a user