On Wed, 23 Apr 2025 14:05:58 GMT, Per Minborg <pminb...@openjdk.org> wrote:
> This PR is based on the work of @mernst-github and aims to implement an > _internal_ thread-local 'stack' allocator, which works like a dynamically > sized arena, but with reset functionality to reset the allocated size back to > a certain level. The underlying memory could stay around between calls, which > could improve performance. > > Re-allocated segments are not zeroed between allocations. Looks to be in parity with the original patch. Can we just cleanly revert commit 77647421c5b13738f6fa145bf30cbb9dd741e164? This new version defines redundant sealed interface + record - feels unnecessary to me. Meanwhile, the BufferStackBench is valueable, but its addition should be kept in a separate commit to make reviewing easier. `trust_final_non_static_fields` in `ciField` already trusts `jdk.internal.foreign`, so I don't think the record performance argument stands here. But making Frame and BufferStack classes final is a good move. ------------- Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24829#pullrequestreview-2788100611 PR Comment: https://git.openjdk.org/jdk/pull/24829#issuecomment-2824546993 PR Comment: https://git.openjdk.org/jdk/pull/24829#issuecomment-2824731824