Re: RFR: 8287788: reuse intermediate segments allocated during FFM stub invocations [v2]

2025-01-19 Thread Matthias Ernst
> Certain signatures for foreign function calls require allocation of an > intermediate buffer to adapt the FFM's to the native stub's calling > convention ("needsReturnBuffer"). In the current implementation, this buffer > is malloced and freed on every FFM invocation, a non-negligible overhead

Re: RFR: 8338428: Add logging if final VM flags while setting properties [v6]

2025-01-19 Thread David Holmes
On Fri, 17 Jan 2025 18:50:22 GMT, Leonid Mesnik wrote: >> Some VM flags might depend on the environment and it makes sense to log >> final flags so it is possible to get their value when investigating failures. >> >> I added them to VMProps, so it is always dump final flags before running >> t

Re: RFR: 8287788: reuse intermediate segments allocated during FFM stub invocations

2025-01-19 Thread Jorn Vernee
On Wed, 15 Jan 2025 21:39:05 GMT, Matthias Ernst wrote: > Certain signatures for foreign function calls require allocation of an > intermediate buffer to adapt the FFM's to the native stub's calling > convention ("needsReturnBuffer"). In the current implementation, this buffer > is malloced an

Re: RFR: 8287788: reuse intermediate segments allocated during FFM stub invocations

2025-01-19 Thread Matthias Ernst
On Fri, 17 Jan 2025 14:58:37 GMT, Jorn Vernee wrote: > Could you add the benchmark you're using to the PR as well? Done. I slotted it into the "points" BM suite, alas I had to define another "DoublePoint" struct, though, since the existing int/int pair gets packed into a long. Full disclosur

RFR: 8287788: reuse intermediate segments allocated during FFM stub invocations

2025-01-19 Thread Matthias Ernst
Certain signatures for foreign function calls require allocation of an intermediate buffer to adapt the FFM's to the native stub's calling convention ("needsReturnBuffer"). In the current implementation, this buffer is malloced and freed on every FFM invocation, a non-negligible overhead. Sampl

Re: Factory methods for SequencedSet and SequencedMap

2025-01-19 Thread Remi Forax
What can be done is to have Set.of()/Map.of() to delegate to SequenceSet.of()/SequenceMap.of() so there is only one implementation at runtime. Also, technically, there is a way to change the return type in a binary compatible way ... if union types are supported in the language. In that case,

Re: Factory methods for SequencedSet and SequencedMap

2025-01-19 Thread David Alayachew
That's the missing link. Thanks Archie. Man, I still don't get the decision-making in 1995 to make it not overridable. It is what it is. On Sat, Jan 18, 2025, 10:06 AM Archie Cobbs wrote: > On Fri, Jan 17, 2025 at 7:50 PM David Alayachew > wrote: > >> I guess my next question is, there is no b