Fwd: RFR: 8175917: [JVMCI] Avoid long JNI handle chains

Christian Haeubl christian.haeubl at oracle.com
Thu Mar 2 15:47:01 UTC 2017


Please review the following patch for 

Bug description:
When Truffle uses JMVCI and Graal for compiling a guest language (e.g. 
JavaScript), Graal heavily uses partial escape analysis. In such cases, 
the JVMCI method "installCode" uses lots of local JNI references when 
generating the corresponding debug information so that the thread's 
top-level JNI handle buffer will have a large size. This unnecessarily 
increases the footprint and significantly decreases the performance (as 
long as https://bugs.openjdk.java.net/browse/JDK-8175318 is not fixed).

Around the JVMCI method "installCode", we do something similar to JNI's 
PushLocalFrame/PopLocalFrame. So, the large JNI handle buffer is 
released when the method exits and the thread's top-level JNI handle 
buffer is not getting enlarged.

The changes were tested locally by executing JVMCI bootstrapping and 
parts of Graal / Truffle.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20170302/7a6bbff5/attachment-0001.html>

More information about the hotspot-compiler-dev mailing list