Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,19 +381,15 @@ HeapWord* ShenandoahCardCluster::first_object_start(const size_t card_index, con
oop obj = cast_to_oop(p);
assert(oopDesc::is_oop(obj), "Should be an object");
#ifdef ASSERT
#define WALK_FORWARD_IN_BLOCK_START true
#else
#define WALK_FORWARD_IN_BLOCK_START false
#endif // ASSERT
while (WALK_FORWARD_IN_BLOCK_START && p + obj->size() < left) {
while (p + obj->size() < left) {
p += obj->size();
obj = cast_to_oop(p);
assert(oopDesc::is_oop(obj), "Should be an object");
assert(Klass::is_valid(obj->klass()), "Not a valid klass ptr");
// Check assumptions in previous block comment if this assert fires
guarantee(false, "Should never need forward walk in block start");
}
#undef WALK_FORWARD_IN_BLOCK_START
#endif // ASSERT
assert(p <= left, "p should start at or before left end of card");
assert(p + obj->size() > left, "obj should end after left end of card");
return p;
Expand Down