8219817: Remove unused CollectedHeap::block_size()
Reviewed-by: shade, stefank
This commit is contained in:
parent
304dca18b5
commit
c6917cc27e
@ -128,7 +128,6 @@ public:
|
||||
|
||||
// No support for block parsing.
|
||||
virtual HeapWord* block_start(const void* addr) const { return NULL; }
|
||||
virtual size_t block_size(const HeapWord* addr) const { return 0; }
|
||||
virtual bool block_is_obj(const HeapWord* addr) const { return false; }
|
||||
|
||||
// No GC threads
|
||||
|
@ -2254,11 +2254,6 @@ HeapWord* G1CollectedHeap::block_start(const void* addr) const {
|
||||
return hr->block_start(addr);
|
||||
}
|
||||
|
||||
size_t G1CollectedHeap::block_size(const HeapWord* addr) const {
|
||||
HeapRegion* hr = heap_region_containing(addr);
|
||||
return hr->block_size(addr);
|
||||
}
|
||||
|
||||
bool G1CollectedHeap::block_is_obj(const HeapWord* addr) const {
|
||||
HeapRegion* hr = heap_region_containing(addr);
|
||||
return hr->block_is_obj(addr);
|
||||
|
@ -1191,11 +1191,6 @@ public:
|
||||
// non-object.
|
||||
virtual HeapWord* block_start(const void* addr) const;
|
||||
|
||||
// Requires "addr" to be the start of a chunk, and returns its size.
|
||||
// "addr + size" is required to be the start of a new chunk, or the end
|
||||
// of the active area of the heap.
|
||||
virtual size_t block_size(const HeapWord* addr) const;
|
||||
|
||||
// Requires "addr" to be the start of a block, and returns "TRUE" iff
|
||||
// the block is an object.
|
||||
virtual bool block_is_obj(const HeapWord* addr) const;
|
||||
|
@ -532,10 +532,6 @@ HeapWord* ParallelScavengeHeap::block_start(const void* addr) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t ParallelScavengeHeap::block_size(const HeapWord* addr) const {
|
||||
return oop(addr)->size();
|
||||
}
|
||||
|
||||
bool ParallelScavengeHeap::block_is_obj(const HeapWord* addr) const {
|
||||
return block_start(addr) == addr;
|
||||
}
|
||||
|
@ -220,7 +220,6 @@ class ParallelScavengeHeap : public CollectedHeap {
|
||||
void safe_object_iterate(ObjectClosure* cl) { object_iterate(cl); }
|
||||
|
||||
HeapWord* block_start(const void* addr) const;
|
||||
size_t block_size(const HeapWord* addr) const;
|
||||
bool block_is_obj(const HeapWord* addr) const;
|
||||
|
||||
jlong millis_since_last_gc();
|
||||
|
@ -450,11 +450,6 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||
// non-object.
|
||||
virtual HeapWord* block_start(const void* addr) const = 0;
|
||||
|
||||
// Requires "addr" to be the start of a chunk, and returns its size.
|
||||
// "addr + size" is required to be the start of a new chunk, or the end
|
||||
// of the active area of the heap.
|
||||
virtual size_t block_size(const HeapWord* addr) const = 0;
|
||||
|
||||
// Requires "addr" to be the start of a block, and returns "TRUE" iff
|
||||
// the block is an object.
|
||||
virtual bool block_is_obj(const HeapWord* addr) const = 0;
|
||||
|
@ -1064,18 +1064,6 @@ HeapWord* GenCollectedHeap::block_start(const void* addr) const {
|
||||
return _old_gen->block_start(addr);
|
||||
}
|
||||
|
||||
size_t GenCollectedHeap::block_size(const HeapWord* addr) const {
|
||||
assert(is_in_reserved(addr), "block_size of address outside of heap");
|
||||
if (_young_gen->is_in_reserved(addr)) {
|
||||
assert(_young_gen->is_in(addr), "addr should be in allocated part of generation");
|
||||
return _young_gen->block_size(addr);
|
||||
}
|
||||
|
||||
assert(_old_gen->is_in_reserved(addr), "Some generation should contain the address");
|
||||
assert(_old_gen->is_in(addr), "addr should be in allocated part of generation");
|
||||
return _old_gen->block_size(addr);
|
||||
}
|
||||
|
||||
bool GenCollectedHeap::block_is_obj(const HeapWord* addr) const {
|
||||
assert(is_in_reserved(addr), "block_is_obj of address outside of heap");
|
||||
assert(block_start(addr) == addr, "addr must be a block start");
|
||||
|
@ -278,13 +278,6 @@ public:
|
||||
// non-object.
|
||||
virtual HeapWord* block_start(const void* addr) const;
|
||||
|
||||
// Requires "addr" to be the start of a chunk, and returns its size.
|
||||
// "addr + size" is required to be the start of a new chunk, or the end
|
||||
// of the active area of the heap. Assumes (and verifies in non-product
|
||||
// builds) that addr is in the allocated part of the heap and is
|
||||
// the start of a chunk.
|
||||
virtual size_t block_size(const HeapWord* addr) const;
|
||||
|
||||
// Requires "addr" to be the start of a block, and returns "TRUE" iff
|
||||
// the block is an object. Assumes (and verifies in non-product
|
||||
// builds) that addr is in the allocated part of the heap and is
|
||||
|
@ -1192,12 +1192,6 @@ HeapWord* ShenandoahHeap::block_start(const void* addr) const {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t ShenandoahHeap::block_size(const HeapWord* addr) const {
|
||||
Space* sp = heap_region_containing(addr);
|
||||
assert(sp != NULL, "block_size of address outside of heap");
|
||||
return sp->block_size(addr);
|
||||
}
|
||||
|
||||
bool ShenandoahHeap::block_is_obj(const HeapWord* addr) const {
|
||||
Space* sp = heap_region_containing(addr);
|
||||
return sp->block_is_obj(addr);
|
||||
|
@ -567,7 +567,6 @@ public:
|
||||
|
||||
// Used for parsing heap during error printing
|
||||
HeapWord* block_start(const void* addr) const;
|
||||
size_t block_size(const HeapWord* addr) const;
|
||||
bool block_is_obj(const HeapWord* addr) const;
|
||||
|
||||
// Used for native heap walkers: heap dumpers, mostly
|
||||
|
@ -245,11 +245,6 @@ HeapWord* ZCollectedHeap::block_start(const void* addr) const {
|
||||
return (HeapWord*)_heap.block_start((uintptr_t)addr);
|
||||
}
|
||||
|
||||
size_t ZCollectedHeap::block_size(const HeapWord* addr) const {
|
||||
size_t size_in_bytes = _heap.block_size((uintptr_t)addr);
|
||||
return ZUtils::bytes_to_words(size_in_bytes);
|
||||
}
|
||||
|
||||
bool ZCollectedHeap::block_is_obj(const HeapWord* addr) const {
|
||||
return _heap.block_is_obj((uintptr_t)addr);
|
||||
}
|
||||
|
@ -100,7 +100,6 @@ public:
|
||||
virtual void safe_object_iterate(ObjectClosure* cl);
|
||||
|
||||
virtual HeapWord* block_start(const void* addr) const;
|
||||
virtual size_t block_size(const HeapWord* addr) const;
|
||||
virtual bool block_is_obj(const HeapWord* addr) const;
|
||||
|
||||
virtual void register_nmethod(nmethod* nm);
|
||||
|
@ -185,11 +185,6 @@ uintptr_t ZHeap::block_start(uintptr_t addr) const {
|
||||
return page->block_start(addr);
|
||||
}
|
||||
|
||||
size_t ZHeap::block_size(uintptr_t addr) const {
|
||||
const ZPage* const page = _pagetable.get(addr);
|
||||
return page->block_size(addr);
|
||||
}
|
||||
|
||||
bool ZHeap::block_is_obj(uintptr_t addr) const {
|
||||
const ZPage* const page = _pagetable.get(addr);
|
||||
return page->block_is_obj(addr);
|
||||
|
@ -99,7 +99,6 @@ public:
|
||||
|
||||
// Block
|
||||
uintptr_t block_start(uintptr_t addr) const;
|
||||
size_t block_size(uintptr_t addr) const;
|
||||
bool block_is_obj(uintptr_t addr) const;
|
||||
|
||||
// Workers
|
||||
|
@ -85,7 +85,6 @@ public:
|
||||
bool is_in(uintptr_t addr) const;
|
||||
|
||||
uintptr_t block_start(uintptr_t addr) const;
|
||||
size_t block_size(uintptr_t addr) const;
|
||||
bool block_is_obj(uintptr_t addr) const;
|
||||
|
||||
bool is_active() const;
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "gc/z/zNUMA.hpp"
|
||||
#include "gc/z/zPage.hpp"
|
||||
#include "gc/z/zPhysicalMemory.inline.hpp"
|
||||
#include "gc/z/zUtils.inline.hpp"
|
||||
#include "gc/z/zVirtualMemory.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
@ -160,14 +159,6 @@ inline uintptr_t ZPage::block_start(uintptr_t addr) const {
|
||||
}
|
||||
}
|
||||
|
||||
inline size_t ZPage::block_size(uintptr_t addr) const {
|
||||
if (block_is_obj(addr)) {
|
||||
return ZUtils::object_size(addr);
|
||||
} else {
|
||||
return end() - top();
|
||||
}
|
||||
}
|
||||
|
||||
inline bool ZPage::block_is_obj(uintptr_t addr) const {
|
||||
return ZAddress::offset(addr) < top();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user