diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2018-01-18 22:44:32 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2018-01-29 09:34:05 +0000 |
commit | 8d728324571b720a952b297787eed70c7a1d1acb (patch) | |
tree | f24a774aa56c236f2f756b1b439e4c61830bec56 /compiler/driver/compiler_options_map-inl.h | |
parent | 0530796b73d0a33a5df27e3a7765c0835994769a (diff) |
Add compiler option for counting hotness in compiled code.
For eventually easier profiling of boot classpath and
system server.
bug: 30934496
Test: 674-hotness-compiled
Change-Id: I0f63c644527b74f6ef2649f481c2a1c731bb9f21
Diffstat (limited to 'compiler/driver/compiler_options_map-inl.h')
-rw-r--r-- | compiler/driver/compiler_options_map-inl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h index f97ab08600..3b18db09fc 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -77,6 +77,9 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string } map.AssignIfExists(Base::VerboseMethods, &options->verbose_methods_); options->deduplicate_code_ = map.GetOrDefault(Base::DeduplicateCode); + if (map.Exists(Base::CountHotnessInCompiledCode)) { + options->count_hotness_in_compiled_code_ = true; + } if (map.Exists(Base::DumpTimings)) { options->dump_timings_ = true; @@ -137,6 +140,9 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) { .WithValueMap({{"false", false}, {"true", true}}) .IntoKey(Map::DeduplicateCode) + .Define({"--count-hotness-in-compiled-code"}) + .IntoKey(Map::CountHotnessInCompiledCode) + .Define({"--dump-timings"}) .IntoKey(Map::DumpTimings) |