OSDN Git Service

Optimizing: Improve const-string code generation.
authorVladimir Marko <vmarko@google.com>
Mon, 22 Feb 2016 10:39:50 +0000 (10:39 +0000)
committerVladimir Marko <vmarko@google.com>
Tue, 29 Mar 2016 18:27:40 +0000 (19:27 +0100)
commitcac5a7e871f1f346b317894359ad06fa7bd67fba
tree2df7d4892216a7c976dfe848c9893cb5eb8fa6a5
parent6f51d7756a9c66007fe7666b19399e1f60ff6092
Optimizing: Improve const-string code generation.

For strings in the boot image, use either direct pointers
or pc-relative addresses. For other strings, use PC-relative
access to the dex cache arrays for AOT and direct address of
the string's dex cache slot for JIT.

For aosp_flounder-userdebug:
  - 32-bit boot.oat: -692KiB (-0.9%)
  - 64-bit boot.oat: -948KiB (-1.1%)
  - 32-bit dalvik cache total: -900KiB (-0.9%)
  - 64-bit dalvik cache total: -3672KiB (-1.5%)
    (contains more files than the 32-bit dalvik cache)
For aosp_flounder-userdebug forced to compile PIC:
  - 32-bit boot.oat: -380KiB (-0.5%)
  - 64-bit boot.oat: -928KiB (-1.0%)
  - 32-bit dalvik cache total: -468KiB (-0.4%)
  - 64-bit dalvik cache total: -1928KiB (-0.8%)
    (contains more files than the 32-bit dalvik cache)

Bug: 26884697
Change-Id: Iec7266ce67e6fedc107be78fab2e742a8dab2696
53 files changed:
compiler/Android.mk
compiler/compiled_method.h
compiler/linker/arm/relative_patcher_thumb2.cc
compiler/linker/arm/relative_patcher_thumb2.h
compiler/linker/arm/relative_patcher_thumb2_test.cc
compiler/linker/arm64/relative_patcher_arm64.cc
compiler/linker/arm64/relative_patcher_arm64.h
compiler/linker/arm64/relative_patcher_arm64_test.cc
compiler/linker/multi_oat_relative_patcher.h
compiler/linker/multi_oat_relative_patcher_test.cc
compiler/linker/relative_patcher.cc
compiler/linker/relative_patcher.h
compiler/linker/relative_patcher_test.h
compiler/linker/x86/relative_patcher_x86.cc
compiler/linker/x86/relative_patcher_x86.h
compiler/linker/x86/relative_patcher_x86_test.cc
compiler/linker/x86_64/relative_patcher_x86_64.cc
compiler/linker/x86_64/relative_patcher_x86_64.h
compiler/linker/x86_64/relative_patcher_x86_64_test.cc
compiler/oat_writer.cc
compiler/optimizing/builder.cc
compiler/optimizing/code_generator.h
compiler/optimizing/code_generator_arm.cc
compiler/optimizing/code_generator_arm.h
compiler/optimizing/code_generator_arm64.cc
compiler/optimizing/code_generator_arm64.h
compiler/optimizing/code_generator_mips.cc
compiler/optimizing/code_generator_mips.h
compiler/optimizing/code_generator_mips64.cc
compiler/optimizing/code_generator_mips64.h
compiler/optimizing/code_generator_x86.cc
compiler/optimizing/code_generator_x86.h
compiler/optimizing/code_generator_x86_64.cc
compiler/optimizing/code_generator_x86_64.h
compiler/optimizing/dex_cache_array_fixups_arm.cc
compiler/optimizing/graph_visualizer.cc
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h
compiler/optimizing/pc_relative_fixups_x86.cc
compiler/optimizing/sharpening.cc
compiler/optimizing/sharpening.h
compiler/utils/string_reference.h [new file with mode: 0644]
runtime/class_linker.cc
runtime/class_linker.h
runtime/intern_table.cc
runtime/intern_table.h
runtime/intern_table_test.cc
runtime/runtime.cc
runtime/safe_map.h
runtime/utf.cc
runtime/utf.h
test/496-checker-inlining-and-class-loader/src/Main.java
test/552-checker-sharpening/src/Main.java