RFR: 8329570: G1: Excessive is_obj_dead_cond calls in verification

Stefan Karlsson stefank at openjdk.org
Wed Apr 3 12:09:10 UTC 2024


On Wed, 3 Apr 2024 11:39:56 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>>> I think it should be moved; the risk of misuse here is low.
>> 
>> If we move it, could/should we add some related comments in the class `G1VerifyLiveAndRemSetClosure` or the related methods?
>
> I'd prefer to have a clear assert failure instead of SEGV. Maybe if we move the assert closer to its first use (`LiveChecker<T> live_check(this, _containing_obj, p, obj, _vo);`), the null-check would filter enough to gain the same perf improvement?

I have an alternative that removes the set_containing_obj and instead sets it in the constructor. This way it should be enough to assert in the constructor. Please, take a look at this patch:
https://github.com/openjdk/jdk/compare/master...stefank:jdk:8329570_is_obj_dead_cond_2

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18595#discussion_r1549604892


More information about the hotspot-gc-dev mailing list