Skip to content

Commit

Permalink
8329570: G1: Excessive is_obj_dead_cond calls in verification
Browse files Browse the repository at this point in the history
Reviewed-by: phh
Backport-of: 29992e1fca4faef0fe0ac453c7e78db4628d5e70
  • Loading branch information
shipilev committed Apr 25, 2024
1 parent f70558d commit 10b427d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/hotspot/share/gc/g1/heapRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ class G1VerificationClosure : public BasicOopIterateClosure {
}

void set_containing_obj(oop obj) {
assert(!_g1h->is_obj_dead_cond(obj, _vo), "Precondition");
_containing_obj = obj;
}

Expand All @@ -519,8 +520,6 @@ class VerifyLiveClosure : public G1VerificationClosure {
template <class T>
void do_oop_work(T* p) {
assert(_containing_obj != NULL, "Precondition");
assert(!_g1h->is_obj_dead_cond(_containing_obj, _vo),
"Precondition");
verify_liveness(p);
}

Expand Down Expand Up @@ -577,8 +576,6 @@ class VerifyRemSetClosure : public G1VerificationClosure {
template <class T>
void do_oop_work(T* p) {
assert(_containing_obj != NULL, "Precondition");
assert(!_g1h->is_obj_dead_cond(_containing_obj, _vo),
"Precondition");
verify_remembered_set(p);
}

Expand Down

1 comment on commit 10b427d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.