8199868: Support JNI critical functions in object pinning API

Pin/unpin incoming array arguments of critical native JNI call

Reviewed-by: shade, adinn
This commit is contained in:
Zhengyu Gu 2018-07-31 13:12:06 -04:00
parent 9d25c65fda
commit b71f3e7104
6 changed files with 493 additions and 2 deletions

View file

@ -486,6 +486,10 @@ class SharedRuntime: AllStatic {
// Block before entering a JNI critical method
static void block_for_jni_critical(JavaThread* thread);
// Pin/Unpin object
static oopDesc* pin_object(JavaThread* thread, oopDesc* obj);
static void unpin_object(JavaThread* thread, oopDesc* obj);
// A compiled caller has just called the interpreter, but compiled code
// exists. Patch the caller so he no longer calls into the interpreter.
static void fixup_callers_callsite(Method* moop, address ret_pc);