On Fri, 20 Mar 2026 11:55:11 GMT, Frederic Parain <[email protected]> wrote:

> The main change in this patch is the use of the C++ acmp_map of the super 
> class to generate the acmp_map of a sub-class instead of using the Java heap 
> allocated int array. There's another fix in the computation of the shift 
> applied to the payload to satisfy atomicity alignment constraints. A few 
> asserts have been added to improve the robustness of the code.
> 
> Testing in progress tiers 1 to 4.
> 
> Thank you,
> 
> Fred

LGTM!

Nit:

src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 1274:

> 1272:         _layout->shift_fields(shift);
> 1273:         assert(_layout->first_field_block()->offset() % 
> required_alignment == 0, "Fields should have been shifted to respect the 
> required alignment");
> 1274:         _payload_offset = _layout->first_field_block()->offset();

Suggestion:

        _payload_offset = _layout->first_field_block()->offset();
        assert(is_aligned(_payload_offset, required_alignment), "Fields should 
have been shifted to respect the required alignment");


and the associated `#include "utilities/align.hpp"`

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

Marked as reviewed by iwalulya (no project role).

PR Review: 
https://git.openjdk.org/valhalla/pull/2248#pullrequestreview-3990017127
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2248#discussion_r2973510322

Reply via email to