RFR: 8296158: Refactor the verification of CDS region checksum [v2]
Ioi Lam
iklam at openjdk.org
Tue Feb 14 22:12:10 UTC 2023
On Wed, 8 Feb 2023 22:15:53 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @matias9927 suggestions
>
> src/hotspot/share/cds/filemap.cpp line 1599:
>
>> 1597: // loaded into memory via FileMapInfo::map_region() or FileMapInfo::read_region().
>> 1598: // I.e., this->mapped_base() must be valid.
>> 1599: if (!VerifySharedSpaces) {
>
> While I think this is a nice shortcut to avoid checking VerifySharedSpaces, I think it occludes the fact it is a necessary condition in the if statements below. Just my 2 cents but I think it is more intuitive to keep `if (VerifySharesSpaces && !check_region_crc())` and keep an assert inside this method.
>
> Either way does work, so go with what you think makes the most sense. Other than that, LGTM!
Thanks for the comment. I fixed the code as you suggested.
-------------
PR: https://git.openjdk.org/jdk/pull/12424
More information about the hotspot-runtime-dev
mailing list