From 0b1c341d2d89a483142cd14bdeb4650ab00184f1 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 14 Jul 2017 18:23:25 -0700 Subject: 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 --- compiler/dex/quick_compiler_callbacks.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'compiler/dex/quick_compiler_callbacks.h') diff --git a/compiler/dex/quick_compiler_callbacks.h b/compiler/dex/quick_compiler_callbacks.h index a3a6c0972c..578aff45e5 100644 --- a/compiler/dex/quick_compiler_callbacks.h +++ b/compiler/dex/quick_compiler_callbacks.h @@ -22,6 +22,7 @@ namespace art { +class CompilerDriver; class VerificationResults; class QuickCompilerCallbacks FINAL : public CompilerCallbacks { @@ -53,8 +54,19 @@ class QuickCompilerCallbacks FINAL : public CompilerCallbacks { verification_results_ = verification_results; } + bool CanAssumeVerified(ClassReference ref) OVERRIDE; + + void SetDoesClassUnloading(bool does_class_unloading, CompilerDriver* compiler_driver) + OVERRIDE { + does_class_unloading_ = does_class_unloading; + compiler_driver_ = compiler_driver; + DCHECK(!does_class_unloading || compiler_driver_ != nullptr); + } + private: VerificationResults* verification_results_ = nullptr; + bool does_class_unloading_ = false; + CompilerDriver* compiler_driver_ = nullptr; std::unique_ptr verifier_deps_; }; -- cgit v1.2.3-59-g8ed1b