Are Java native methods inlined ?
john.r.rose at oracle.com
Wed Apr 27 21:13:15 UTC 2016
On Apr 27, 2016, at 3:33 AM, Andrew Haley <aph at redhat.com> wrote:
> The glue code between Java and native code is not inlined into its
> caller but it is generated by the JIT compiler. Like every
> optimization in HotSpot, this is only done for hot code. If you run
> something like Netbeans you'll see a lot of native nmethods generated.
In Project Panama we are experimenting with inlining wrapper logic
for native calls. But the 20-year practice in HotSpot is (as you say)
to roll a separate, non-inlined wrapper for each JNI method. The JIT
per se does not create this wrapper, but rather this logic:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev