OSDN Git Service

Move annotations to native.
authorJeff Hao <jeffhao@google.com>
Thu, 30 Jul 2015 03:14:10 +0000 (20:14 -0700)
committerJeff Hao <jeffhao@google.com>
Sat, 22 Aug 2015 00:05:27 +0000 (17:05 -0700)
commit0042c6d49b8488c78f0b937063e316e8d6244439
tree170286a01d08badebacaebed1db325bc889e259e
parent300432d27ba9dd6961458fb1e1c845766f25c50a
Move annotations to native.

Art side of this change. There is also a corresponding Libcore change.

Seeing ~2-3x speedup over dalvik KK MR1 in AnnotatedElementBenchmark.
Benchmark  Speedup of Art AOSP to Dalvik KK MR1
GetAllReturnsLargeAnnotation  2.99
GetAllReturnsMarkerAnnotation  2.20
GetAllReturnsNoAnnotation  2.43
GetAllReturnsSmallAnnotation  2.52
GetAllReturnsThreeAnnotations  2.87
GetAnnotationsOnSubclass  2.42
GetDeclaredAnnotationsOnSubclass 2.49
GetFieldAnnotation  2.68
GetFieldAnnotations  2.60
GetMethodAnnotation  2.66
GetMethodAnnotations  2.61
GetParameterAnnotations  2.52
GetTypeAnnotation  2.56
GetTypeAnnotations  2.17
IsFieldAnnotationPresent  3.26
IsMethodAnnotationPresent  4.99
IsTypeAnnotationPresent  1.34

Change-Id: Ibdbb6d23b17eaab6e83c8774b1bb9401e8227941
12 files changed:
runtime/class_linker.cc
runtime/class_linker.h
runtime/dex_file.cc
runtime/dex_file.h
runtime/mirror/class.cc
runtime/mirror/class.h
runtime/native/java_lang_Class.cc
runtime/native/java_lang_reflect_Constructor.cc
runtime/native/java_lang_reflect_Field.cc
runtime/native/java_lang_reflect_Method.cc
runtime/well_known_classes.cc
runtime/well_known_classes.h