diff options
author | 2017-07-14 18:23:25 -0700 | |
---|---|---|
committer | 2017-08-08 12:44:39 -0700 | |
commit | 0b1c341d2d89a483142cd14bdeb4650ab00184f1 (patch) | |
tree | 1eb65853f4a9c53fda1a778911dd32979ef43e32 /compiler/dex/quick_compiler_callbacks.cc | |
parent | 5129d8ede52ea31c0304ecaa8013f833310772a2 (diff) |
Support class unloading in dex2oat for quicken multidex
Support class unloading for the quicken compilation filter. This will
be enabled in a follow up CL.
Added a test that compares with and without unloading. The way that
it tests this is by adding an output app image. Having an app image
disables the unloading. This test also covers that app images don't
change the odex (currently).
Added a test for the assumed verified logic.
Bug: 63467744
Test: test-art-host
Test: test/testrunner/testrunner.py --interpreter --host -j40
Change-Id: I1e8a862c6f089c06c58aa0c846797e4c24bd072c
Diffstat (limited to 'compiler/dex/quick_compiler_callbacks.cc')
-rw-r--r-- | compiler/dex/quick_compiler_callbacks.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/dex/quick_compiler_callbacks.cc b/compiler/dex/quick_compiler_callbacks.cc index 872f7ea15d..c7e9f4fc07 100644 --- a/compiler/dex/quick_compiler_callbacks.cc +++ b/compiler/dex/quick_compiler_callbacks.cc @@ -16,6 +16,7 @@ #include "quick_compiler_callbacks.h" +#include "driver/compiler_driver.h" #include "verification_results.h" #include "verifier/method_verifier-inl.h" @@ -33,4 +34,17 @@ void QuickCompilerCallbacks::ClassRejected(ClassReference ref) { } } +bool QuickCompilerCallbacks::CanAssumeVerified(ClassReference ref) { + // If we don't have class unloading enabled in the compiler, we will never see class that were + // previously verified. Return false to avoid overhead from the lookup in the compiler driver. + if (!does_class_unloading_) { + return false; + } + DCHECK(compiler_driver_ != nullptr); + // In the case of the quicken filter: avoiding verification of quickened instructions, which the + // verifier doesn't currently support. + // In the case of the verify filter, avoiding verifiying twice. + return compiler_driver_->CanAssumeVerified(ref); +} + } // namespace art |