summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-12-21 15:39:33 +0200
committer Calin Juravle <calin@google.com> 2016-01-07 16:23:18 +0000
commit998c21661b5074c293cae818d0ab7c44dcda3a66 (patch)
treec9abd63c18abc18f9d9206ca8c22c318523d0544 /compiler/driver/compiler_driver.h
parent5e2b971e468ca73a8e10a120730b3b6f17fad408 (diff)
Perform profile file analysis in dex2oat
Dex2oat can accept now multiple profile files to drive a profile based compilation. --profile-file and --reference-profile-file speficy a pair of profile files which will be evaluated for significant differences before starting the compilation. If the difference is insignificant (according to some internal metric) the compilation is skipped and a message is logged. Multiple pairs of --profile-file and --reference-profile-file can be specified. This effectively enables multi user support since profiles for different users will be kept separately. --reference-profile-file can be left out, case in which the decision is solely based on --profile-file. If both flags are present, then their repetition should form unique pairs. If the compilation is performed and --reference-profile-file is given then its data is merged with the data from the corresponding --profile- file and saved back to the file. If no profile flags are given, dex2oat proceeds as before and compiles the dex files unconditionally. As part of this change - merge ProfileCompilationInfo and OfflineProfilingInfo under the same object. There was no use to keep them separate anymore. - SaveProfilingInfo now merges the data with what was in the file before instead of overwriting it. Bug: 26080105 Change-Id: Ia8c8b55587d468bca5179f78941854285426234d
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r--compiler/driver/compiler_driver.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index fa0cb9a412..3847c8183e 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -97,8 +97,8 @@ class CompilerDriver {
size_t thread_count, bool dump_stats, bool dump_passes,
const std::string& dump_cfg_file_name, bool dump_cfg_append,
CumulativeLogger* timer, int swap_fd,
- const std::string& profile_file,
- const std::unordered_map<const DexFile*, const char*>* dex_to_oat_map);
+ const std::unordered_map<const DexFile*, const char*>* dex_to_oat_map,
+ const ProfileCompilationInfo* profile_compilation_info);
~CompilerDriver();
@@ -657,9 +657,6 @@ class CompilerDriver {
// This option may be restricted to the boot image, depending on a flag in the implementation.
std::unique_ptr<std::unordered_set<std::string>> methods_to_compile_;
- // Info for profile guided compilation.
- std::unique_ptr<ProfileCompilationInfo> profile_compilation_info_;
-
bool had_hard_verifier_failure_;
size_t thread_count_;
@@ -689,6 +686,9 @@ class CompilerDriver {
CompiledMethodStorage compiled_method_storage_;
+ // Info for profile guided compilation.
+ const ProfileCompilationInfo* const profile_compilation_info_;
+
friend class CompileClassVisitor;
DISALLOW_COPY_AND_ASSIGN(CompilerDriver);
};