summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2018-01-11 14:50:02 -0800
committerMathieu Chartier <mathieuc@google.com>2018-01-16 11:24:02 -0800
commit8740c66cbfbeb3b7f306279c843650c3b18f2dca (patch)
treef6c095c184fdf3e5fb2f243acdc818ce20e928a5 /compiler/optimizing/graph_visualizer.cc
parentdcbe96b23b8be48d4cce799caf5a9a207b137f06 (diff)
Use efficient encoding for compact dex code item fields
Use a compact format for compact dex code items. In the common case, there are only 4 bytes worth of fields. This is accomplished by shrining the fields and adding an optional preheader before each code item that describes fields that don't fit in the fast path case. The preheader may use up to 12 extra bytes. Experiments showed that the preheader is only non empty for ~1% of code items. CompactDex code item: 0-12 bytes: Optional preheader <Code item pointer> 4 bits: register size 4 bits: ins size 4 bits: outs size 4 bits: tries size 11 bits: num code item units 5 bits: preheader flags [Dex Instructions] Standard dex code item: See: https://source.android.com/devices/tech/dalvik/dex-format <Code item pointer> 16 bits: register size 16 bits: ins size 16 bits: outs size 16 bits: tries size 32 bits: num code item units [Dex Instructions] Also change code item alignment to be 2 byte aligned for code items that don't have payload instructions that require 4 byte alignments. Results (on golem). The CL reduces vdex size by an average of 4.3%. Interpreter performance is 0.3-1% slower, but may be noise. Test: test-art-host Bug: 63756964 Change-Id: I836fd098063dd1573a3dfb6ac465a6d33d2cb2c9
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions