RFR: 8337939: ZGC: Make assertions and checks less convoluted and explicit [v3]
Stefan Karlsson
stefank at openjdk.org
Thu Aug 8 15:12:34 UTC 2024
On Thu, 8 Aug 2024 14:33:09 GMT, Joel Sikström <duke at openjdk.org> wrote:
>> There are currently cases where calls to type converters are made only to assert whether the conversion is reasonable or not and then discarding the result. For example, to_zaddress(...) is used to check if the pointer passed to it is a valid zaddress or not, whilst discarding the result of the conversion.
>>
>> Additionally, a call like oopDesc::is_oop(to_oop(o)) is convoluted since a similar check to is_oop() is already done inside to_oop(), which should be a separate operation in its entirety.
>>
>> Asserts/checks in affected places should be separated so that assertion/checking can be explicitly made and not done more than necessary.
>>
>> Tested with tiers 1-7 on linux64 and linux64-debug.
>
> Joel Sikström has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>
> - Merge branch 'master' into zgc_assert_check_cleanup
> - Update copyright years
> - Fix zaddress parameter name
> - Update zPage.inline.hpp
> - 8337939: ZGC: Make assertions and checks less convoluted and explicit
Marked as reviewed by stefank (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/20478#pullrequestreview-2228179678
More information about the hotspot-gc-dev
mailing list