On Fri, 2 May 2025 14:12:42 GMT, Per Minborg wrote:
> The performance before this PR can be seen in the "confined" benchmarks
> above. In those benchmarks, a regular `Arena.ofConfined` is created upon
> every invocation.
Yes - but I was referring to the performance of the native call -- not th
On Fri, 2 May 2025 16:08:09 GMT, Shaojin Wen wrote:
>> Using an anonymous class for the cleanup action had very adverse effects on
>> performance. I didn't want to use a lambda for startup performance reasons.
>
> If using lambda affects performance, how about using anonymous classes?
>
>
On Fri, 2 May 2025 14:11:19 GMT, Per Minborg wrote:
>>> any reason why you didn't use a lambda here?
>>
>> I also think that CleanupAction should be changed to lambda
>
> Using an anonymous class for the cleanup action had very adverse effects on
> performance. I didn't want to use a lambda for
On Fri, 2 May 2025 14:14:28 GMT, Per Minborg wrote:
> Can you summarize your proposed changes below as It was a bit unclear to me
> what you meant. I can create a separate PR with those changes later.
My suggestion is to use two records (both PerThread and Frame) to replace the
original inner
On Fri, 2 May 2025 11:13:27 GMT, Per Minborg 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 cert
On Fri, 2 May 2025 11:56:31 GMT, Shaojin Wen wrote:
>> And, if you do that, you then don't need the `of` factory -- clients can
>> just use `new`
>
>> any reason why you didn't use a lambda here?
>
> I also think that CleanupAction should be changed to lambda
Using an anonymous class for the c
On Fri, 2 May 2025 10:41:38 GMT, Per Minborg wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Address comments
>
> Updated benchmarks:
>
>
> Benchmark(ELEM_SIZE) Mode Cnt Score Err
On Fri, 2 May 2025 11:47:15 GMT, Maurizio Cimadamore
wrote:
>> Also, not a big fan of records here -- it seems that many implementation
>> details such as cleanup action, lock and slicing allocator are "leaked out"
>> to the caller, that is now responsible to set things up correctly. I think a
On Fri, 2 May 2025 11:45:33 GMT, Maurizio Cimadamore
wrote:
>> src/java.base/share/classes/jdk/internal/foreign/BufferStack.java line 127:
>>
>>> 125: arena,
>>> 126: new SlicingAllocator(arena.allocate(byteSize,
>>> byteAlignment)),
>>> 127:
On Fri, 2 May 2025 11:13:27 GMT, Per Minborg 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 cert
On Fri, 2 May 2025 11:36:56 GMT, Maurizio Cimadamore
wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Cleanup and only create CleanupAction once per thread
>
> src/java.base/share/classes/jdk/internal/foreign/Buffer
On Fri, 2 May 2025 11:13:27 GMT, Per Minborg 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 cert
On Fri, 2 May 2025 10:41:38 GMT, Per Minborg wrote:
> Updated benchmarks:
>
> ```
> Benchmark(ELEM_SIZE) Mode Cnt Score Error
> Units
> BufferStackBench.OfVirtual.buffer 8 avgt 15 12.695 ± 0.205
> ns/op
> BufferStackBench.OfVirtual.buffer
On Fri, 2 May 2025 11:13:27 GMT, Per Minborg 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 cert
On Fri, 2 May 2025 11:13:27 GMT, Per Minborg 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 cert
On Fri, 2 May 2025 10:40:04 GMT, Per Minborg 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 cert
> 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
On Fri, 2 May 2025 10:40:04 GMT, Per Minborg 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 cert
> 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
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
On Thu, 1 May 2025 09:09:16 GMT, Maurizio Cimadamore
wrote:
>> Ugh - it's a record, I see. Which brings up the question -- should it be a
>> record? Should it advertize its `size and `tl` components (they seem rather
>> implementation specific?).
>
> Was this done so that the final field could
On Wed, 30 Apr 2025 17:59:31 GMT, Jorn Vernee wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Improve on comments
>
> test/jdk/java/foreign/TestBufferStackStress2.java line 98:
>
>> 96: Syst
On Thu, 1 May 2025 10:20:44 GMT, Maurizio Cimadamore
wrote:
>> src/java.base/share/classes/jdk/internal/foreign/BufferStack.java line 163:
>>
>>> 161: lock.unlock();
>>> 162: }
>>> 163: Reference.reachabilityFence(arena);
>>
>> I'm not sure t
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
On Thu, 1 May 2025 09:22:57 GMT, Maurizio Cimadamore
wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Improve on comments
>
> src/java.base/share/classes/jdk/internal/foreign/BufferStack.java line 163:
>
>> 161:
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
On Thu, 1 May 2025 09:04:00 GMT, Maurizio Cimadamore
wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Improve on comments
>
> src/java.base/share/classes/jdk/internal/foreign/BufferStack.java line 81:
>
>> 79:
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
On Thu, 1 May 2025 09:05:58 GMT, Maurizio Cimadamore
wrote:
>> src/java.base/share/classes/jdk/internal/foreign/BufferStack.java line 81:
>>
>>> 79: @Override
>>> 80: public int hashCode() {
>>> 81: return System.identityHashCode(this);
>>
>> What's the value in these overloads
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
On Wed, 30 Apr 2025 15:33:52 GMT, Per Minborg 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 cer
> 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
> 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
On Wed, 30 Apr 2025 10:55:41 GMT, Per Minborg 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 cer
On Wed, 30 Apr 2025 10:55:41 GMT, Per Minborg 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 cer
> 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
> 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
> 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
On Tue, 29 Apr 2025 19:54:07 GMT, Per Minborg wrote:
> maybe we should problem list or exclude macOS testing?
Yes, I think we should. The issue is quite intermittent, and last time it only
started showing up in CI as well. I think we should move the `stress()` test to
a separate file./jtreg te
On Wed, 23 Apr 2025 14:05:58 GMT, Per Minborg 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
On Wed, 23 Apr 2025 14:05:58 GMT, Per Minborg 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
On Wed, 23 Apr 2025 14:05:58 GMT, Per Minborg 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
On Wed, 23 Apr 2025 14:05:58 GMT, Per Minborg 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
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,
46 matches
Mail list logo