8316420: Serial: Remove unused GenCollectedHeap::oop_iterate

Reviewed-by: stefank, tschatzl
This commit is contained in:
Albert Mingkun Yang 2023-09-19 08:25:52 +00:00
parent d038571213
commit 86115c2a2e
6 changed files with 0 additions and 46 deletions

@ -832,11 +832,6 @@ bool GenCollectedHeap::is_in_partial_collection(const void* p) {
}
#endif
void GenCollectedHeap::oop_iterate(OopIterateClosure* cl) {
_young_gen->oop_iterate(cl);
_old_gen->oop_iterate(cl);
}
void GenCollectedHeap::object_iterate(ObjectClosure* cl) {
_young_gen->object_iterate(cl);
_old_gen->object_iterate(cl);

@ -195,7 +195,6 @@ public:
void prune_scavengable_nmethods();
// Iteration functions.
void oop_iterate(OopIterateClosure* cl);
void object_iterate(ObjectClosure* cl) override;
// A CollectedHeap is divided into a dense sequence of "blocks"; that is,

@ -233,21 +233,6 @@ bool Generation::block_is_obj(const HeapWord* p) const {
return blk.is_obj;
}
class GenerationOopIterateClosure : public SpaceClosure {
public:
OopIterateClosure* _cl;
virtual void do_space(Space* s) {
s->oop_iterate(_cl);
}
GenerationOopIterateClosure(OopIterateClosure* cl) :
_cl(cl) {}
};
void Generation::oop_iterate(OopIterateClosure* cl) {
GenerationOopIterateClosure blk(cl);
space_iterate(&blk);
}
class GenerationObjIterateClosure : public SpaceClosure {
private:
ObjectClosure* _cl;

@ -322,10 +322,6 @@ class Generation: public CHeapObj<mtGC> {
// Iteration.
// Iterate over all the ref-containing fields of all objects in the
// generation, calling "cl.do_oop" on each.
virtual void oop_iterate(OopIterateClosure* cl);
// Iterate over all objects in the generation, calling "cl.do_object" on
// each.
virtual void object_iterate(ObjectClosure* cl);

@ -518,26 +518,11 @@ void ContiguousSpace::verify() const {
}
}
void Space::oop_iterate(OopIterateClosure* blk) {
ObjectToOopClosure blk2(blk);
object_iterate(&blk2);
}
bool Space::obj_is_alive(const HeapWord* p) const {
assert (block_is_obj(p), "The address should point to an object");
return true;
}
void ContiguousSpace::oop_iterate(OopIterateClosure* blk) {
if (is_empty()) return;
HeapWord* obj_addr = bottom();
HeapWord* t = top();
// Could call objects iterate, but this is easier.
while (obj_addr < t) {
obj_addr += cast_to_oop(obj_addr)->oop_iterate_size(blk);
}
}
void ContiguousSpace::object_iterate(ObjectClosure* blk) {
if (is_empty()) return;
object_iterate_from(bottom(), blk);

@ -163,11 +163,6 @@ class Space: public CHeapObj<mtGC> {
virtual size_t used() const = 0;
virtual size_t free() const = 0;
// Iterate over all the ref-containing fields of all objects in the
// space, calling "cl.do_oop" on each. Fields in objects allocated by
// applications of the closure are not included in the iteration.
virtual void oop_iterate(OopIterateClosure* cl);
// Iterate over all objects in the space, calling "cl.do_object" on
// each. Objects allocated by applications of the closure are not
// included in the iteration.
@ -444,7 +439,6 @@ private:
HeapWord* par_allocate(size_t word_size) override;
// Iteration
void oop_iterate(OopIterateClosure* cl) override;
void object_iterate(ObjectClosure* blk) override;
// Compaction support