[foreign-abi] RFR 8233317: Add the ProgrammableInvoker
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Thu Oct 31 11:42:21 UTC 2019
Hi Jorn,
this looks good to go in. As you say, the testing support has improved
(e.g. here on Linux the upcall test used to fail, while now everything
passes with the new invoker port). Also, the backend is much more
scrutable than the one we had in the past, and there's only one of them,
rather than two (universal + direct). So, implementation-wise it's also
a definite step up.
We can keep improving and tweak the code as we move along, I think at
this time is better to just push this in, and take it from there, since
this is good enough.
One thing we'll need to figure out, eventually, is how to map types
bigger than a java long (e.g. Int128, or 'long double'), as I don't
think we're doing much in that space (the old invoker was also not
tackling that problem either). While we could lower these types down to
long/doubles (so dropping 64 bits on the floor) we do not have a memory
access story to e.g. read and write these into structs (since the memory
access API requires that carrier size == layout size).
Maurizio
On 31/10/2019 11:25, Jorn Vernee wrote:
> Hi,
>
> This is an RFR for the patches posted to the "On Invokers" thread [1].
> It is a merge of the 3 patches for the different ABIs, made by
> Maurizio, Nick, and myself. Attribution will be given through the
> "Contributed-by" clause of the commit message.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8233317
> Webrev: http://cr.openjdk.java.net/~jvernee/prog_back_final/webrev.00/
>
> There is more work that can still be done around this area, but since
> all the tests are passing I think this is a good first version. Some
> items still on the TODO list:
> - Factor out IMR adapter code into shared utility.
> - Make ABIDescriptor/BufferLayout code in the VM shared, if possible.
> - Revisit register spill/fill code in upcall/downcall stub.
>
> On the other hand, we discovered some holes in the tests which
> revealed some bugs that are now fixed, and some bugs were left behind
> in the old implementation [2], so I think overall the
> ProgrammableInvoker has undergone more testing than the old backend had.
>
> Thanks,
> Jorn
>
> [1] :
> https://mail.openjdk.java.net/pipermail/panama-dev/2019-September/006347.html
> [2] : https://bugs.openjdk.java.net/browse/JDK-8231502
>
More information about the panama-dev
mailing list