OSDN Git Service

Change 64 bit ArtMethod fields to be pointer sized
authorMathieu Chartier <mathieuc@google.com>
Mon, 10 Nov 2014 19:08:06 +0000 (11:08 -0800)
committerMathieu Chartier <mathieuc@google.com>
Tue, 18 Nov 2014 01:43:40 +0000 (17:43 -0800)
commite832e64a7e82d7f72aedbd7d798fb929d458ee8f
tree307c7d13edf397b2b7b5491590d5404aa099be00
parenta477bbb62ba197815d840d07708526a2bb9c8b4d
Change 64 bit ArtMethod fields to be pointer sized

Changed the 64 bit entrypoint and gc map fields in ArtMethod to be
pointer sized. This saves a large amount of memory on 32 bit systems.
Reduces ArtMethod size by 16 bytes on 32 bit.

Total number of ArtMethod on low memory mako: 169957
Image size: 49203 methods -> 787248 image size reduction.
Zygote space size: 1070 methods -> 17120 size reduction.
App methods: ~120k -> 2 MB savings.

Savings per app on low memory mako: 125K+ per app
(less active apps -> more image methods per app).

Savings depend on how often the shared methods are on dirty pages vs
shared.

TODO in another CL, delete gc map field from ArtMethod since we
should be able to get it from the Oat method header.

Bug: 17643507

Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8
34 files changed:
compiler/compilers.cc
compiler/dex/quick/gen_invoke.cc
compiler/image_writer.cc
compiler/image_writer.h
compiler/jni/quick/jni_compiler.cc
compiler/optimizing/code_generator_arm.cc
compiler/optimizing/code_generator_x86.cc
compiler/optimizing/code_generator_x86_64.cc
patchoat/patchoat.cc
patchoat/patchoat.h
runtime/arch/arm/portable_entrypoints_arm.S
runtime/arch/arm/quick_entrypoints_arm.S
runtime/arch/arm64/quick_entrypoints_arm64.S
runtime/arch/mips/portable_entrypoints_mips.S
runtime/arch/mips/quick_entrypoints_mips.S
runtime/arch/x86/portable_entrypoints_x86.S
runtime/arch/x86/quick_entrypoints_x86.S
runtime/arch/x86_64/quick_entrypoints_x86_64.S
runtime/asm_support.h
runtime/class_linker.cc
runtime/class_linker.h
runtime/class_linker_test.cc
runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
runtime/image.cc
runtime/instruction_set.h
runtime/interpreter/interpreter.cc
runtime/mirror/art_method-inl.h
runtime/mirror/art_method.cc
runtime/mirror/art_method.h
runtime/mirror/class.h
runtime/mirror/object-inl.h
runtime/mirror/object.h
runtime/mirror/object_test.cc
runtime/native_bridge_art_interface.cc