diff options
| author | 2016-07-29 14:46:37 -0700 | |
|---|---|---|
| committer | 2016-08-23 15:12:26 -0700 | |
| commit | 3aaa37bba53d6df0265793de48b4b0b57327e57a (patch) | |
| tree | ce795803f0f10003eb3d96d9348da620937675b3 /runtime/interpreter/interpreter_common.h | |
| parent | 792c98bb773c8c2390f9cbf774f85be9d9a75332 (diff) | |
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
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
| -rw-r--r-- | runtime/interpreter/interpreter_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index 90c8227443..acdc270b28 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -450,7 +450,7 @@ static inline void TraceExecution(const ShadowFrame& shadow_frame, const Instruc oss << StringPrintf(" vreg%u=0x%08X", i, raw_value); if (ref_value != nullptr) { if (ref_value->GetClass()->IsStringClass() && - ref_value->AsString()->GetValue() != nullptr) { + !ref_value->AsString()->IsValueNull()) { oss << "/java.lang.String \"" << ref_value->AsString()->ToModifiedUtf8() << "\""; } else { oss << "/" << PrettyTypeOf(ref_value); |