OSDN Git Service

Add layout scheme to dexlayout for dex file reordering.
authorJeff Hao <jeffhao@google.com>
Wed, 19 Oct 2016 18:17:11 +0000 (11:17 -0700)
committerJeff Hao <jeffhao@google.com>
Tue, 22 Nov 2016 21:33:09 +0000 (13:33 -0800)
commit042e898f18767ed326980e3b07d39adbf98f6222
treee2ea81bc5ddbab51cb3d5c0d5b7812cf9f85562e
parent608f2ce4b9870354079b9d63d40363914889f01a
Add layout scheme to dexlayout for dex file reordering.

Currently takes startup classes from profile and groups them together
with the lowest class indexes. Moves the ClassDef, ClassData, and
CodeItem sections.

Results gathered from 5 second systrace of app startup (no other input):
Maps
base.vdex - 24.70MB -> 19.35MB (30.50MB file size)
base.odex - 13.22MB -> 12.82MB (13.22MB file size)
Running time of dex2oat: 27.5s -> 37.1s

Photos
base.vdex - 12.98MB ->  9.77MB (15.10MB file size)
base.odex -  6.84MB ->  6.24MB ( 6.84MB file size)
Running time of dex2oat: 15.6s -> 19.9s

Plus
base.vdex - 14.09MB -> 13.29MB (16.72MB file size)
base.odex -  2.47MB ->  2.47MB ( 2.47MB file size)
Running time of dex2oat: 14.1s -> 18.5s

Performance and memory tracking bug: b/33017139

Test: mm test-art-host-gtest-dexlayout_test
Bug: 29921113
Change-Id: Ib500ed353d71a606e2db0dd80378750c5f7b8e33
dex2oat/dex2oat.cc
dex2oat/dex2oat_test.cc
dexlayout/dexlayout.cc
dexlayout/dexlayout.h
dexlayout/dexlayout_test.cc