RFR: 8337939: ZGC: Make assertions and checks less convoluted and explicit [v3]

duke duke at openjdk.org
Thu Aug 8 17:44:33 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

@jsikstro 
Your change (at version 426c4be69b9d287345378587748b777f16beed2d) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/20478#issuecomment-2276344924


More information about the hotspot-gc-dev mailing list