[foreign-abi] [Rev 01] RFR: 8245988: Add a special VaList carrier
Jorn Vernee
jvernee at openjdk.java.net
Thu Jun 4 12:15:08 UTC 2020
On Thu, 4 Jun 2020 11:44:57 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now
>> contains six commits:
>> - Add VaList benchmarks
>> - Finished testing VaList and added MemoryAddress <-> VaList converters
>> - - Added testing of structs passed on the stack.
>> - Added documentation.
>> - Merge Reader and VaList interfaces
>> - Copy by-value structs to maintain semantics
>> - Add support for a special VaList carrier to upcalls and downcalls
>
> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/abi/x64/windows/WinVaList.java line 231:
>
>> 230: VarHandle writer = arg.varHandle();
>> 231: writer.set(addr, arg.value);
>> 232: }
>
> From a performance perspective, both this and the reader code above are suboptimal, in two dimensions:
> * the VH used is not constant
> * the type of the get/set call is not exact
> No need to dive in premature optimization territory now, but perhaps worth keeping in mind.
Thanks. I want to get the API right first, and then move on to tackling performance after that is finished, since
diagnosing and solving performance problems usually takes a long time on it's own.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/184
More information about the panama-dev
mailing list