From 5132e0d1433b0962f9609dbbd68427e1fb5a4b9d Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 10 Jul 2019 09:38:48 -0700 Subject: Add option for controling app image class initialization The new option is --initialize-app-image-classes. This attempts to initialize app image classes by running the class initializers ahead of time. Will test this through test 660, but there are currently aborts when it's enabled. Test: test-art-host Bug: 70735003 Change-Id: Icc05683b23098a15531097f67aad17144f0badaf --- 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 aebde101c8..e8a425d465 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -79,6 +79,7 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string options->count_hotness_in_compiled_code_ = true; } map.AssignIfExists(Base::ResolveStartupConstStrings, &options->resolve_startup_const_strings_); + map.AssignIfExists(Base::InitializeAppImageClasses, &options->initialize_app_image_classes_); if (map.Exists(Base::CheckProfiledMethods)) { options->check_profiled_methods_ = *map.Get(Base::CheckProfiledMethods); } @@ -192,6 +193,11 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) { .WithValueMap({{"false", false}, {"true", true}}) .IntoKey(Map::ResolveStartupConstStrings) + .Define("--initialize-app-image-classes=_") + .template WithType() + .WithValueMap({{"false", false}, {"true", true}}) + .IntoKey(Map::InitializeAppImageClasses) + .Define("--verbose-methods=_") .template WithType>() .IntoKey(Map::VerboseMethods) -- cgit v1.2.3-59-g8ed1b