RFR: 8245025: MoveAndUpdateClosure::do_addr calls function with side-effects in an assert [v2]
Kim Barrett
kbarrett at openjdk.java.net
Mon Mar 15 08:02:08 UTC 2021
On Wed, 10 Mar 2021 11:34:28 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Make the assertion code side-effect free.
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> review
Other than the mentioned comment modification, looks good.
src/hotspot/share/gc/parallel/psParallelCompact.cpp line 810:
> 808: // code, we prefer the side-effect free version so that no side-effect will
> 809: // not leak into release code.
> 810: if (use_block_table) {
I'm having trouble making sense of the last sentence of this comment, even though I think I know what is intended. Perhaps something like "IIn debug-only code (such as asserts), we prefer the slower but side-effect free version, to avoid side effects that would not occur for release code and could potentially affect future calculations."
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2898
More information about the hotspot-gc-dev
mailing list