From cd0f38fcbda3e578ac27e483a1ffb7718f83fb7a Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Mon, 15 Oct 2018 09:44:35 -0700 Subject: Add logic to eagerly resolve const-string for startup methods Added dex2oat option --resolve-startup-const-strings= If true, this option causes the compiler driver to resolve all const-strings that are referenced from methods marked as "startup" in the profile. Bug: 116059983 Test: test-art-host Change-Id: I61cf9e945c125671fc4ab4b50458a911318a837f --- compiler/driver/compiler_driver.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 343f67c6d5..9a83e55c96 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -430,6 +430,12 @@ class CompilerDriver { typedef AtomicDexRefMap MethodTable; private: + // Resolve const string literals that are loaded from dex code. If only_startup_strings is + // specified, only methods that are marked startup in the profile are resolved. + void ResolveConstStrings(const std::vector& dex_files, + bool only_startup_strings, + /*inout*/ TimingLogger* timings); + // All method references that this compiler has compiled. MethodTable compiled_methods_; -- cgit v1.2.3-59-g8ed1b