From daaf3265806eb2eadb2e03302bd68022fab5ca28 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 24 Mar 2015 13:30:28 -0700 Subject: Add AccessibleObject and Field to mirror Main motivation is to remove all the functionality / field access on java side to ArtField. Also comes with some reflection speedups / slowdowns. Summary results: getDeclaredField/getField are slower mostly due to JNI overhead. However, there is a large speedup in getInt, setInt, GetInstanceField, and GetStaticField. Before timings (N5 --compiler-filter=everything): benchmark ns linear runtime Class_getDeclaredField 782.86 === Class_getField 832.77 === Field_getInt 160.17 = Field_setInt 195.88 = GetInstanceField 3214.38 ============== GetStaticField 6809.49 ============================== After: Class_getDeclaredField 1068.15 ============ Class_getField 1180.00 ============== Field_getInt 121.85 = Field_setInt 139.98 = GetInstanceField 1986.15 ======================= GetStaticField 2523.63 ============================== Bug: 19264997 Change-Id: Ic0d0fc1b56b95cd6d60f8e76f19caeaa23045c77 --- oatdump/oatdump.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'oatdump') diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index 7bde4710a0..322d3aa8f1 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -1597,7 +1597,7 @@ class ImageDumper { os << StringPrintf("null %s\n", PrettyDescriptor(field->GetTypeDescriptor()).c_str()); } else { // Grab the field type without causing resolution. - mirror::Class* field_type = field->GetType(false); + mirror::Class* field_type = field->GetType(); if (field_type != nullptr) { PrettyObjectValue(os, field_type, value); } else { -- cgit v1.2.3