OSDN Git Service

Move ArtField to native
authorMathieu Chartier <mathieuc@google.com>
Fri, 27 Mar 2015 21:35:38 +0000 (14:35 -0700)
committerMathieu Chartier <mathieuc@google.com>
Fri, 10 Apr 2015 19:57:27 +0000 (12:57 -0700)
commitc785344b87221f5e4e6473e5b762e4e61fe65dcf
treecd32ad2c2604596a18926f04d4c313dab255ecfd
parenta29d93b380c9aeb8270e281aefbdd0c77a430d43
Move ArtField to native

Add linear alloc. Moved ArtField to be native object. Changed image
writer to put ArtFields after the mirror section.

Savings:
2MB on low ram devices
4MB on normal devices

Total PSS measurements before (normal N5, 95s after shell start):
Image size: 7729152 bytes
23112 kB: .NonMoving
23212 kB: .NonMoving
22868 kB: .NonMoving
23072 kB: .NonMoving
22836 kB: .NonMoving
19618 kB: .Zygote
19850 kB: .Zygote
19623 kB: .Zygote
19924 kB: .Zygote
19612 kB: .Zygote
Avg: 42745.4 kB

After:
Image size: 7462912 bytes
17440 kB: .NonMoving
16776 kB: .NonMoving
16804 kB: .NonMoving
17812 kB: .NonMoving
16820 kB: .NonMoving
18788 kB: .Zygote
18856 kB: .Zygote
19064 kB: .Zygote
18841 kB: .Zygote
18629 kB: .Zygote
3499 kB: .LinearAlloc
3408 kB: .LinearAlloc
3424 kB: .LinearAlloc
3600 kB: .LinearAlloc
3436 kB: .LinearAlloc
Avg: 39439.4 kB

No reflection performance changes.

Bug: 19264997
Bug: 17643507

Change-Id: I10c73a37913332080aeb978c7c94713bdfe4fe1c
108 files changed:
compiler/dex/dex_to_dex_compiler.cc
compiler/dex/mir_field_info.cc
compiler/dex/verified_method.cc
compiler/driver/compiler_driver-inl.h
compiler/driver/compiler_driver.cc
compiler/driver/compiler_driver.h
compiler/driver/compiler_driver_test.cc
compiler/image_test.cc
compiler/image_writer.cc
compiler/image_writer.h
compiler/optimizing/builder.cc
compiler/utils/dex_cache_arrays_layout-inl.h
compiler/utils/dex_cache_arrays_layout.h
imgdiag/imgdiag.cc
oatdump/oatdump.cc
patchoat/patchoat.cc
patchoat/patchoat.h
runtime/Android.mk
runtime/arch/stub_test.cc
runtime/art_field-inl.h [moved from runtime/mirror/art_field-inl.h with 79% similarity]
runtime/art_field.cc [moved from runtime/mirror/art_field.cc with 55% similarity]
runtime/art_field.h [moved from runtime/mirror/art_field.h with 52% similarity]
runtime/asm_support.h
runtime/base/arena_allocator.cc
runtime/base/arena_allocator.h
runtime/base/mutex.h
runtime/check_jni.cc
runtime/class_linker-inl.h
runtime/class_linker.cc
runtime/class_linker.h
runtime/class_linker_test.cc
runtime/common_runtime_test.cc
runtime/common_throws.cc
runtime/common_throws.h
runtime/debugger.cc
runtime/debugger.h
runtime/dex_file.cc
runtime/dex_file.h
runtime/entrypoints/entrypoint_utils-inl.h
runtime/entrypoints/entrypoint_utils.cc
runtime/entrypoints/entrypoint_utils.h
runtime/entrypoints/quick/quick_field_entrypoints.cc
runtime/gc/accounting/mod_union_table.cc
runtime/gc/accounting/remembered_set.cc
runtime/gc/accounting/space_bitmap.cc
runtime/gc/collector/concurrent_copying.cc
runtime/gc/collector/mark_compact.cc
runtime/gc/collector/mark_sweep-inl.h
runtime/gc/collector/mark_sweep.cc
runtime/gc/heap.cc
runtime/gc/space/image_space.cc
runtime/gc/space/image_space.h
runtime/globals.h
runtime/hprof/hprof.cc
runtime/image.cc
runtime/image.h
runtime/instrumentation.cc
runtime/instrumentation.h
runtime/interpreter/interpreter_common.cc
runtime/interpreter/interpreter_common.h
runtime/interpreter/unstarted_runtime.cc
runtime/jdwp/jdwp.h
runtime/jdwp/jdwp_event.cc
runtime/jit/jit_instrumentation.h
runtime/jni_internal.cc
runtime/linear_alloc.cc [new file with mode: 0644]
runtime/linear_alloc.h [new file with mode: 0644]
runtime/mem_map.cc
runtime/mirror/array-inl.h
runtime/mirror/array.h
runtime/mirror/art_method.cc
runtime/mirror/class-inl.h
runtime/mirror/class.h
runtime/mirror/dex_cache-inl.h
runtime/mirror/dex_cache.cc
runtime/mirror/dex_cache.h
runtime/mirror/dex_cache_test.cc
runtime/mirror/field-inl.h
runtime/mirror/field.cc
runtime/mirror/field.h
runtime/mirror/object-inl.h
runtime/mirror/object.cc
runtime/mirror/object.h
runtime/mirror/object_array-inl.h
runtime/mirror/object_test.cc
runtime/native/dalvik_system_VMRuntime.cc
runtime/native/java_lang_Class.cc
runtime/native/java_lang_reflect_Array.cc
runtime/native/java_lang_reflect_Constructor.cc
runtime/oat_file_assistant_test.cc
runtime/primitive.h
runtime/proxy_test.cc
runtime/quick/inline_method_analyser.cc
runtime/read_barrier.h
runtime/reflection.cc
runtime/reflection.h
runtime/runtime.cc
runtime/runtime.h
runtime/scoped_thread_state_change.h
runtime/thread.cc
runtime/trace.cc
runtime/trace.h
runtime/transaction_test.cc
runtime/utils.cc
runtime/utils.h
runtime/utils_test.cc
runtime/verifier/method_verifier.cc
runtime/verifier/method_verifier.h