8316357: Serial: Remove unused GenCollectedHeap::space_containing
Reviewed-by: tschatzl
This commit is contained in:
parent
3828dc913a
commit
ecce2afc1a
src/hotspot/share/gc/shared
@ -842,16 +842,6 @@ void GenCollectedHeap::object_iterate(ObjectClosure* cl) {
|
||||
_old_gen->object_iterate(cl);
|
||||
}
|
||||
|
||||
Space* GenCollectedHeap::space_containing(const void* addr) const {
|
||||
Space* res = _young_gen->space_containing(addr);
|
||||
if (res != nullptr) {
|
||||
return res;
|
||||
}
|
||||
res = _old_gen->space_containing(addr);
|
||||
assert(res != nullptr, "Could not find containing space");
|
||||
return res;
|
||||
}
|
||||
|
||||
HeapWord* GenCollectedHeap::block_start(const void* addr) const {
|
||||
assert(is_in_reserved(addr), "block_start of address outside of heap");
|
||||
if (_young_gen->is_in_reserved(addr)) {
|
||||
|
@ -197,7 +197,6 @@ public:
|
||||
// Iteration functions.
|
||||
void oop_iterate(OopIterateClosure* cl);
|
||||
void object_iterate(ObjectClosure* cl) override;
|
||||
Space* space_containing(const void* addr) const;
|
||||
|
||||
// A CollectedHeap is divided into a dense sequence of "blocks"; that is,
|
||||
// each address in the (reserved) heap is a member of exactly
|
||||
|
@ -172,13 +172,6 @@ oop Generation::promote(oop obj, size_t obj_size) {
|
||||
return new_obj;
|
||||
}
|
||||
|
||||
Space* Generation::space_containing(const void* p) const {
|
||||
GenerationIsInReservedClosure blk(p);
|
||||
// Cast away const
|
||||
((Generation*)this)->space_iterate(&blk);
|
||||
return blk.sp;
|
||||
}
|
||||
|
||||
// Some of these are mediocre general implementations. Should be
|
||||
// overridden to get better performance.
|
||||
|
||||
|
@ -176,10 +176,6 @@ class Generation: public CHeapObj<mtGC> {
|
||||
return _reserved.contains(p);
|
||||
}
|
||||
|
||||
// If some space in the generation contains the given "addr", return a
|
||||
// pointer to that space, else return "null".
|
||||
virtual Space* space_containing(const void* addr) const;
|
||||
|
||||
// Iteration - do not use for time critical operations
|
||||
virtual void space_iterate(SpaceClosure* blk, bool usedOnly = false) = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user