ART: Add -verbose:dex
Add a dex verbose flag to separate out concerns for dex investigations.
(cherry picked from commit bec07a05dd1aa564895f0d9c58c8277c576dc9bb)
Bug: 37158297
Test: m test-art-host
Change-Id: Ice5efad919ae0b6838d44e2f3711563a0774ef0e
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc
index 5b331bc..1a2b9cd 100644
--- a/cmdline/cmdline_parser_test.cc
+++ b/cmdline/cmdline_parser_test.cc
@@ -300,6 +300,13 @@
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 cd19fa4..e33a207 100644
--- a/cmdline/cmdline_types.h
+++ b/cmdline/cmdline_types.h
@@ -656,6 +656,8 @@
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 a173ac2..7a9184e 100644
--- a/runtime/base/logging.h
+++ b/runtime/base/logging.h
@@ -56,6 +56,7 @@
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.