From 66d874d96d5699bb090c59f47a5a528956ca053e Mon Sep 17 00:00:00 2001 From: Richard Uhler Date: Thu, 15 Jan 2015 09:37:19 -0800 Subject: Create OatFileAssistant class for assisting with oat files. The oat file assistant is used for determining whether dex2oat or patchoat is needed, for running dex2oat or patchoat as needed to make an oat file up to date, and to load dex files associated with a given dex location. The introduction of the OatFileAssistant class is meant to clean up and consolidate code related to the management of oat files that was duplicated and spread across dalvik_system_DexFile.cc and class_linker.cc. Bug: 11301553 Change-Id: I0c16027b9bae4570c2c50faa9c14f581c0cbafb8 --- cmdline/cmdline_parser_test.cc | 7 +++++++ cmdline/cmdline_types.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'cmdline') diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc index 130eed2..9f873b3 100644 --- a/cmdline/cmdline_parser_test.cc +++ b/cmdline/cmdline_parser_test.cc @@ -260,6 +260,13 @@ TEST_F(CmdlineParserTest, TestLogVerbosity) { } EXPECT_SINGLE_PARSE_FAIL("-verbose:blablabla", CmdlineResult::kUsage); // invalid verbose opt + + { + const char* log_args = "-verbose:oat"; + LogVerbosity log_verbosity = LogVerbosity(); + log_verbosity.oat = true; + EXPECT_SINGLE_PARSE_VALUE(log_verbosity, log_args, M::Verbose); + } } // TEST_F // TODO: Enable this b/19274810 diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h index de99278..03165ed 100644 --- a/cmdline/cmdline_types.h +++ b/cmdline/cmdline_types.h @@ -591,6 +591,8 @@ struct CmdlineType : CmdlineTypeParser { log_verbosity.jni = true; } else if (verbose_options[j] == "monitor") { log_verbosity.monitor = true; + } else if (verbose_options[j] == "oat") { + log_verbosity.oat = true; } else if (verbose_options[j] == "profiler") { log_verbosity.profiler = true; } else if (verbose_options[j] == "signals") { -- cgit v1.1