Commit dc8691a duke
committed Jan 23, 2024
File tree 2 files changed +5
-13
lines changed
src/hotspot/share/gc/shared
2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -146,14 +146,11 @@ bool Space::obj_is_alive(const HeapWord* p) const {
146
146
}
147
147
148
148
void ContiguousSpace::object_iterate (ObjectClosure* blk) {
149
- if (is_empty ()) return ;
150
- object_iterate_from (bottom (), blk);
151
- }
152
-
153
- void ContiguousSpace::object_iterate_from (HeapWord* mark, ObjectClosure* blk) {
154
- while (mark < top ()) {
155
- blk->do_object (cast_to_oop (mark));
156
- mark += cast_to_oop (mark)->size ();
149
+ HeapWord* addr = bottom ();
150
+ while (addr < top ()) {
151
+ oop obj = cast_to_oop (addr);
152
+ blk->do_object (obj);
153
+ addr += obj->size ();
157
154
}
158
155
}
159
156
Original file line number Diff line number Diff line change @@ -283,11 +283,6 @@ class ContiguousSpace: public Space {
283
283
template <typename OopClosureType>
284
284
void oop_since_save_marks_iterate (OopClosureType* blk);
285
285
286
- // Same as object_iterate, but starting from "mark", which is required
287
- // to denote the start of an object. Objects allocated by
288
- // applications of the closure *are* included in the iteration.
289
- virtual void object_iterate_from (HeapWord* mark, ObjectClosure* blk);
290
-
291
286
// Very inefficient implementation.
292
287
HeapWord* block_start_const (const void * p) const override ;
293
288
size_t block_size (const HeapWord* p) const override ;
You can’t perform that action at this time.
0 commit comments