OSDN Git Service

creating workflow for mirror::String compression
authorjessicahandojo <jessicahandojo@google.com>
Fri, 29 Jul 2016 21:46:37 +0000 (14:46 -0700)
committerjessicahandojo <jessicahandojo@google.com>
Tue, 23 Aug 2016 22:12:26 +0000 (15:12 -0700)
commit3aaa37bba53d6df0265793de48b4b0b57327e57a
treece795803f0f10003eb3d96d9348da620937675b3
parent792c98bb773c8c2390f9cbf774f85be9d9a75332
creating workflow for mirror::String compression

All-ASCII String characters are stored in 8-bit blocks
instead of 16-bit. The compression has not taken place, but all
workflow are in the code already (changing kUseStringCompression in
string.h file to TRUE will enable the feature)

Notes: Feature works on interpreter only without optimizing

Test art: m ART_TEST_INTERPRETER=true ART_TEST_OPTIMIZING=false
          test-art-host

Also tested with String tests from libcore/:
1. libcore.java.lang.StringTest
2. libcore.java.lang.StringBufferTest
3. libcore.java.lang.StringBuilderTest
4. libcore.java.lang.OldStringTest
5. libcore.java.lang.OldStringBufferTest

Memory improvement is 33% (from 6.03% to 4.03%, total String memory
from all apps per total memory of all apps) measured on Angler
with Hprof tools

Bug: 31040547
Change-Id: I9cc92c265ebf1305fc06b5fc33efd83797660cce
24 files changed:
compiler/image_test.cc
runtime/arch/stub_test.cc
runtime/common_runtime_test.h
runtime/debugger.cc
runtime/hprof/hprof.cc
runtime/intern_table.cc
runtime/interpreter/interpreter_common.h
runtime/interpreter/interpreter_goto_table_impl.cc
runtime/interpreter/interpreter_switch_impl.cc
runtime/interpreter/mterp/mterp.cc
runtime/interpreter/unstarted_runtime_test.cc
runtime/jdwp/jdwp_bits.h
runtime/jni_internal.cc
runtime/jni_internal_test.cc
runtime/mirror/object_test.cc
runtime/mirror/string-inl.h
runtime/mirror/string.cc
runtime/mirror/string.h
runtime/native/java_lang_Class.cc
runtime/native/libcore_util_CharsetUtils.cc
runtime/utf.cc
runtime/utf.h
test/020-string/expected.txt
test/020-string/src/Main.java