OSDN Git Service

jni: Fast path for @FastNative annotated java methods
authorIgor Murashkin <iam@google.com>
Fri, 29 Jul 2016 16:51:58 +0000 (09:51 -0700)
committerIgor Murashkin <iam@google.com>
Tue, 16 Aug 2016 20:19:36 +0000 (20:19 +0000)
commit9d4b6da934934c322536ee3309b63ce402740f49
tree9e7ee5023d6036b98e0560411bb0527efdedca01
parent2af1aa066e3d20edd8fea5d5b6dbbbad73102d52
jni: Fast path for @FastNative annotated java methods

Adds a faster path for java methods annotated with
dalvik.annotation.optimization.FastNative .

Intended to replace usage of fast JNI (registering with "!(FOO)BAR" descriptors).

Performance Microbenchmark Results (Angler):
* Regular JNI cost in nanoseconds: 115
* Fast JNI cost in nanoseconds: 60
* @FastNative cost in nanoseconds: 36

Summary: Up to 67% faster (vs fast jni) JNI transition cost

Change-Id: Ic23823ae0f232270c068ec999fd89aa993894b0e
25 files changed:
compiler/compiler.h
compiler/driver/compiler_driver.cc
compiler/jni/jni_compiler_test.cc
compiler/jni/quick/jni_compiler.cc
compiler/jni/quick/jni_compiler.h
compiler/oat_test.cc
compiler/optimizing/optimizing_compiler.cc
runtime/art_method.cc
runtime/art_method.h
runtime/asm_support.h
runtime/dex_file.cc
runtime/dex_file.h
runtime/entrypoints/quick/quick_default_init_entrypoints.h
runtime/entrypoints/quick/quick_entrypoints.h
runtime/entrypoints/quick/quick_entrypoints_list.h
runtime/entrypoints/quick/quick_jni_entrypoints.cc
runtime/entrypoints_order_test.cc
runtime/jni_internal.cc
runtime/parsed_options.cc
runtime/thread.cc
runtime/well_known_classes.cc
runtime/well_known_classes.h
test/004-JniTest/jni_test.cc
test/004-JniTest/src/Main.java
test/MyClassNatives/MyClassNatives.java