RFR: 8329570: G1: Excessive is_obj_dead_cond calls in verification
Stefan Karlsson
stefank at openjdk.org
Wed Apr 3 11:30:10 UTC 2024
On Wed, 3 Apr 2024 11:19:17 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> You mean moving `assert(_containing_obj != nullptr, "must be");` from `do_oop_work`? I think it should stay there, as it verifies that someone called `set_containing_obj` before doing `do_oop_work`?
>
> I think it is better to add a new one insteading of moving it.
Moving it removed yet another 0.5s from the runtime of the test. Are you sure you want to keep it?
FWIW, this is the only (current) usage of set_containing_obj and oop_iterate over the closure. I don't think it is a great risk that someone will accidentally move/copy the oop_iterate call and fail to call set_containing_obj.
cl.set_containing_obj(obj);
obj->oop_iterate(&cl);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18595#discussion_r1549537929
More information about the hotspot-gc-dev
mailing list