summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options_map-inl.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-04-13 17:28:34 -0700
committerAndreas Gampe <agampe@google.com>2018-10-16 18:16:56 -0700
commit5c803116e26ef40ad2a9c14d3411e21d149e0c9b (patch)
tree349db3055779728a6b60eecfbb0b2e800af1d468 /compiler/driver/compiler_options_map-inl.h
parenta683248b80d901f3dc8e37ac9764712875f27da9 (diff)
ART: Add profile-compile-check support
Add --check-profiled-methods, which verifies that all methods mentioned in a profile for a guided compilation are actually compiled instead of being punted. As outcome it may log or abort dex2oat. TODO: Extend dex2oat_test Bug: 76145463 Test: mmma art Test: m test-art-host Change-Id: I956113b55796d0666db9dbfd387105a7d27b0868
Diffstat (limited to 'compiler/driver/compiler_options_map-inl.h')
-rw-r--r--compiler/driver/compiler_options_map-inl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h
index 5a844959c4..c7334a72e7 100644
--- a/compiler/driver/compiler_options_map-inl.h
+++ b/compiler/driver/compiler_options_map-inl.h
@@ -81,6 +81,9 @@ 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_);
+ if (map.Exists(Base::CheckProfiledMethods)) {
+ options->check_profiled_methods_ = *map.Get(Base::CheckProfiledMethods);
+ }
if (map.Exists(Base::DumpTimings)) {
options->dump_timings_ = true;
@@ -145,6 +148,12 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) {
.Define({"--count-hotness-in-compiled-code"})
.IntoKey(Map::CountHotnessInCompiledCode)
+ .Define({"--check-profiled-methods=_"})
+ .template WithType<ProfileMethodsCheck>()
+ .WithValueMap({{"log", ProfileMethodsCheck::kLog},
+ {"abort", ProfileMethodsCheck::kAbort}})
+ .IntoKey(Map::CheckProfiledMethods)
+
.Define({"--dump-timings"})
.IntoKey(Map::DumpTimings)