RFR: 8312749: Generational ZGC: Tests crash with assert(index == 0 || is_power_of_2(index)) [v2]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Thu Aug 24 11:45:28 UTC 2023
On Mon, 21 Aug 2023 10:23:06 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> If I understand it correctly, much of the diff is to ensure that `ArrayCopyNode::make` (in `BarrierSetC2::clone`) gets the correct value for the `length` arg, calculated as `align_up(array-length * elem-size, word-size) / word-size`.
>
> I wonder if it's possible to pass the actual array length (#slots) as `length` and move the merge-bytes-to-words-copying optimization to a lower level, e.g. inside `conjoint_jbytes`. Ofc, `BarrierSetC2::clone_at_expansion` and its derived siblings need to be adjusted accordingly, e.g. to use the actual elem-type.
>
> (Preexisting: having `ArrayCopyNode` to cover both array and instance cloning hinders the readability, IMO.)
Thanks for looking at this, Albert! I agree that the code could benefit from some clean-up, and postponing the merge-bytes-to-words-copying optimization to at least BarrierSetC2::clone_at_expansion() is worth exploring. However, your suggested refactoring would not be trivial, so I suggest to integrate this fix as-is and address the simplification in a separate RFE. Please let me know if you agree, and, if so, I will create a separate RFE for your suggestion.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15288#issuecomment-1691520338
More information about the hotspot-gc-dev
mailing list