diff options
| author | 2015-10-29 12:18:29 +0000 | |
|---|---|---|
| committer | 2015-10-30 15:38:39 +0000 | |
| commit | d1eaf0dc9abc42dbcbbd9c4b98bf930ae5f394f3 (patch) | |
| tree | 335509fbc92becce5cb08e23361e2cae86756729 /compiler/oat_test.cc | |
| parent | 594c0612519e96bcc1bd42ff4dcbfa2c53b09c5a (diff) | |
Keep list of dex files for oat file in CompilerDriver.
Use this list to improve invoke-static/-direct dispatch for
intra-oat calls.
Also fix a latent ArmBaseRelativePatcher::ReserveSpaceEnd()
bug exposed by a buggy early version of this CL: when we
have unresolved patches at the end of all code, we need to
emit a final thunk. Though the OatWriter will try to patch
the unresolved call to a trampoline at the beginning of the
oat file, that trampoline may be too far and the relative
patcher doesn't know about it anyway, so it needs to assume
that a thunk is needed.
This reduces the overall size of oat files present in dalvik
cache on Nexus 9 after first boot by over 1MiB, AOSP ToT,
aosp_flounder-userdebug build.
Change-Id: I98604b70cb17377eed057c1c23971865cf344e43
Diffstat (limited to 'compiler/oat_test.cc')
| -rw-r--r-- | compiler/oat_test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc index 06576cc9e1..ea3cb667e2 100644 --- a/compiler/oat_test.cc +++ b/compiler/oat_test.cc @@ -98,6 +98,7 @@ TEST_F(OatTest, WriteRead) { jobject class_loader = nullptr; if (kCompile) { TimingLogger timings2("OatTest::WriteRead", false, false); + compiler_driver_->SetDexFilesForOatFile(class_linker->GetBootClassPath()); compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), &timings2); } |