RFR: 8349146: [REDO] Implement a better allocator for downcalls [v6]
Per Minborg
pminborg at openjdk.org
Wed Apr 30 15:55:46 UTC 2025
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg <pminborg at 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.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Improve on comments
Updated benchmarks:
Benchmark (ELEM_SIZE) Mode Cnt Score Error Units
BufferStackBench.OfVirtual.buffer 8 avgt 15 12.653 ± 0.189 ns/op
BufferStackBench.OfVirtual.buffer 16 avgt 15 12.635 ± 0.228 ns/op
BufferStackBench.OfVirtual.buffer 32 avgt 15 12.562 ± 0.062 ns/op
BufferStackBench.OfVirtual.confined 8 avgt 15 22.649 ± 0.262 ns/op
BufferStackBench.OfVirtual.confined 16 avgt 15 23.507 ± 0.146 ns/op
BufferStackBench.OfVirtual.confined 32 avgt 15 25.426 ± 0.512 ns/op
BufferStackBench.buffer 8 avgt 15 4.693 ± 0.037 ns/op
BufferStackBench.buffer 16 avgt 15 4.715 ± 0.032 ns/op
BufferStackBench.buffer 32 avgt 15 4.670 ± 0.038 ns/op
BufferStackBench.confined 8 avgt 15 22.548 ± 0.022 ns/op
BufferStackBench.confined 16 avgt 15 23.494 ± 0.092 ns/op
BufferStackBench.confined 32 avgt 15 25.285 ± 0.076 ns/op
and
Benchmark Mode Cnt Score Error Units
CallOverheadByValue.OfVirtual.byPtr avgt 15 4.095 ± 0.035 ns/op
CallOverheadByValue.OfVirtual.byValue avgt 15 16.666 ± 0.208 ns/op
CallOverheadByValue.byPtr avgt 15 4.132 ± 0.146 ns/op
CallOverheadByValue.byValue avgt 15 11.835 ± 0.139 ns/op
Pases `tier1` testing on various platforms and JVM configurations
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24829#issuecomment-2842462592
More information about the core-libs-dev
mailing list