[foreign-abi] Intrinsify down calls
john.r.rose at oracle.com
Sun Jun 14 20:48:19 UTC 2020
On Jun 5, 2020, at 8:10 AM, Jorn Vernee <JORN.VERNEE at ORACLE.COM> wrote:
> For now I've reimplemented the stub lifetime management without using a cleaner. As mentioned, the stubs are now attached to the nmethod, and cleaned up when the nmethod is. This also means we can defer the stub generation until intrinsification happens, which in itself reduces pressure on the code cache.
> The diff can still be found here: https://github.com/openjdk/panama-foreign/compare/foreign-abi...JornVernee:Call_Intrinsics_Stubs
> This gets all tests passing again, and performance numbers still look good.
We have a recurring, long-term need for managing multiple code resources
for one JVM method; that would be a 1-N relation between Method* meta-objects
and nmethod/CodeBlob blocks, instead of the current 1-1.
This seems to be another use case which pushes on that envelope.
When we get to dynamic specialization of generic methods, in order
to factor things like Arrays.sort down to a smaller number of methods,
we will need this big time, because the JVM will need to keep track
of one specialization of a generic method (like sort and all its subroutines)
per type parameter (like int, long, float, double, BigDecimal, LongRational,
each species of vector, etc., etc.).
We already have some ad hoc logic for recording (in a side table) the
OSR entry points of methods, which already constitute a 1-N relation.
If we add versions of methods which work inside and outside the JVM,
that’s another case where we either build ad hoc side-links or side-tables,
or bite the bullet and create a consolidated scheme for managing multiple
method versions off of a single Method*.
FTR, see https://bugs.openjdk.java.net/browse/JDK-8038356
More information about the panama-dev