Inlining Java native calls at runtime

Levon Stepanian, Angela Demke Brown, Allan Kielstra, Gita Koblents, Kevin Stoodley

Proceedings of the 1st ACM/USENIX international conference on Virtual Execution Environments (VEE), Chicago, IL, June 2005

 

Abstract

We introduce a strategy for inlining native functions into Java<sup>TM</sup> applications using a JIT compiler. We perform further optimizations to transform inlined callbacks into semantically equivalent lightweight operations. We show that this strategy can substantially reduce the overhead of performing JNI calls, while preserving the key safety and portability properties of the JNI. Our work leverages the ability to store statically-generated IL alongside native binaries, to facilitate native inlining at Java callsites at JIT compilation time. Preliminary results with our prototype implementation show speedups of up to 93X when inlining and callback transformation are combined.

 

Manuscript

Pdf

 

Bibtex

Bib