diff options
| author | 2017-04-11 13:48:37 -0700 | |
|---|---|---|
| committer | 2017-04-11 13:48:37 -0700 | |
| commit | bec07a05dd1aa564895f0d9c58c8277c576dc9bb (patch) | |
| tree | 590e3147526123734a3d5a7ec401822bf35b73d1 | |
| parent | e2dfd30e752ed94944cb6f614f1a4cf18d038677 (diff) | |
ART: Add -verbose:dex
Add a dex verbose flag to separate out concerns for dex investigations.
Bug: 37158297
Test: m test-art-host
Change-Id: Ice5efad919ae0b6838d44e2f3711563a0774ef0e
| -rw-r--r-- | cmdline/cmdline_parser_test.cc | 7 | ||||
| -rw-r--r-- | cmdline/cmdline_types.h | 2 | ||||
| -rw-r--r-- | runtime/base/logging.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc index 5b331bcbec..1a2b9cde67 100644 --- a/cmdline/cmdline_parser_test.cc +++ b/cmdline/cmdline_parser_test.cc @@ -300,6 +300,13 @@ TEST_F(CmdlineParserTest, TestLogVerbosity) { log_verbosity.oat = true; EXPECT_SINGLE_PARSE_VALUE(log_verbosity, log_args, M::Verbose); } + + { + const char* log_args = "-verbose:dex"; + LogVerbosity log_verbosity = LogVerbosity(); + log_verbosity.dex = 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 cd19fa415c..e33a2070dd 100644 --- a/cmdline/cmdline_types.h +++ b/cmdline/cmdline_types.h @@ -656,6 +656,8 @@ struct CmdlineType<LogVerbosity> : CmdlineTypeParser<LogVerbosity> { log_verbosity.systrace_lock_logging = true; } else if (verbose_options[j] == "agents") { log_verbosity.agents = true; + } else if (verbose_options[j] == "dex") { + log_verbosity.dex = true; } else { return Result::Usage(std::string("Unknown -verbose option ") + verbose_options[j]); } diff --git a/runtime/base/logging.h b/runtime/base/logging.h index a173ac2d4d..7a9184e07e 100644 --- a/runtime/base/logging.h +++ b/runtime/base/logging.h @@ -56,6 +56,7 @@ struct LogVerbosity { bool image; bool systrace_lock_logging; // Enabled with "-verbose:sys-locks". bool agents; + bool dex; // Some dex access output etc. }; // Global log verbosity setting, initialized by InitLogging. |