From ca3c8c33501bf199d6fd0a5db30a27d8e010cb23 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Tue, 6 Sep 2016 14:04:48 +0100 Subject: Collect verifier dependencies MethodVerifier tests whether a DEX method is valid w.r.t. the classes in class path. Since the APK does not change across OTA updates, it is not necessary to analyze the bytecode again with MethodVerifier, as long as its dependencies on the class path (which may have changed) are satisfied. This patch introduces VerifierDeps, a class path dependency collector, and adds hooks into MethodVerifier where classes/methods/fields are resolved and where assignability of types is tested. Test: m test-art-host-gtest-verifier_deps_test Bug: 30937355 Change-Id: Iee0b321d772a5c7d1cb471aaa6e13918310b7e2f --- runtime/compiler_callbacks.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/compiler_callbacks.h') diff --git a/runtime/compiler_callbacks.h b/runtime/compiler_callbacks.h index ee797e0712..00dedef1e7 100644 --- a/runtime/compiler_callbacks.h +++ b/runtime/compiler_callbacks.h @@ -25,6 +25,7 @@ namespace art { namespace verifier { class MethodVerifier; +class VerifierDeps; } // namespace verifier @@ -45,6 +46,8 @@ class CompilerCallbacks { // done so. Return false if relocating in this way would be problematic. virtual bool IsRelocationPossible() = 0; + virtual verifier::VerifierDeps* GetVerifierDeps() const = 0; + bool IsBootImage() { return mode_ == CallbackMode::kCompileBootImage; } -- cgit v1.2.3-59-g8ed1b