RFR: 8329858: G1: Make G1VerifyLiveAndRemSetClosure stateless

Thomas Schatzl tschatzl at openjdk.org
Mon Apr 8 14:06:11 UTC 2024


On Mon, 8 Apr 2024 13:00:51 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/g1HeapRegion.cpp line 651:
>> 
>>> 649:       _failures(failures) {
>>> 650:     assert(containing_obj != nullptr, "must be");
>>> 651:     assert(!G1CollectedHeap::heap()->is_obj_dead_cond(containing_obj, _vo), "Precondition");
>> 
>> In this new structure, these two asserts are not very useful any more, IMO.
>
> Good point. The `is_obj_dead_cond` has already been checked by the caller. I can see why someone would like to keep the null-check. I'll see what @tschatzl says, and will make changes after that.

Feel free to drop both.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18677#discussion_r1555901660


More information about the hotspot-gc-dev mailing list