8324513: Inline ContiguousSpace::object_iterate_from
Reviewed-by: stefank
This commit is contained in:
parent
fbaaac63d4
commit
2a01c798d3
@ -146,14 +146,11 @@ bool Space::obj_is_alive(const HeapWord* p) const {
|
||||
}
|
||||
|
||||
void ContiguousSpace::object_iterate(ObjectClosure* blk) {
|
||||
if (is_empty()) return;
|
||||
object_iterate_from(bottom(), blk);
|
||||
}
|
||||
|
||||
void ContiguousSpace::object_iterate_from(HeapWord* mark, ObjectClosure* blk) {
|
||||
while (mark < top()) {
|
||||
blk->do_object(cast_to_oop(mark));
|
||||
mark += cast_to_oop(mark)->size();
|
||||
HeapWord* addr = bottom();
|
||||
while (addr < top()) {
|
||||
oop obj = cast_to_oop(addr);
|
||||
blk->do_object(obj);
|
||||
addr += obj->size();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,11 +283,6 @@ protected:
|
||||
template <typename OopClosureType>
|
||||
void oop_since_save_marks_iterate(OopClosureType* blk);
|
||||
|
||||
// Same as object_iterate, but starting from "mark", which is required
|
||||
// to denote the start of an object. Objects allocated by
|
||||
// applications of the closure *are* included in the iteration.
|
||||
virtual void object_iterate_from(HeapWord* mark, ObjectClosure* blk);
|
||||
|
||||
// Very inefficient implementation.
|
||||
HeapWord* block_start_const(const void* p) const override;
|
||||
size_t block_size(const HeapWord* p) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user