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_options_map-inl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/driver/compiler_options_map-inl.h') diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h index d4a582fb35..5a844959c4 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -80,6 +80,7 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string if (map.Exists(Base::CountHotnessInCompiledCode)) { options->count_hotness_in_compiled_code_ = true; } + map.AssignIfExists(Base::ResolveStartupConstStrings, &options->resolve_startup_const_strings_); if (map.Exists(Base::DumpTimings)) { options->dump_timings_ = true; @@ -184,6 +185,11 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) { .template WithType() .IntoKey(Map::RegisterAllocationStrategy) + .Define("--resolve-startup-const-strings=_") + .template WithType() + .WithValueMap({{"false", false}, {"true", true}}) + .IntoKey(Map::ResolveStartupConstStrings) + .Define("--verbose-methods=_") .template WithType>() .IntoKey(Map::VerboseMethods); -- cgit v1.2.3-59-g8ed1b