diff options
| author | 2014-04-10 13:06:10 -0700 | |
|---|---|---|
| committer | 2014-04-10 13:18:18 -0700 | |
| commit | 644789fa0e807a9aa6d6e32d36ce039ec7318a7f (patch) | |
| tree | 68f41d07551c56ac51c189f26f9fc863c656da83 | |
| parent | e81a7c314afc8f92afcdbc3cbc2331afca7dcb3d (diff) | |
Fix problem with empty profiles.
This fixes an issue where a profile file was created by the installer
but never written by the runtime. This happens when profiles are off.
This caused the compiler to think that there are no methods worthy
of compilation and skipped everything.
Bug: 13960166
Change-Id: I4c4598d4746218e21ca949112071dc1424d7d1f9
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 2 | ||||
| -rw-r--r-- | runtime/profiler.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index b66082dedd..2b20c6fc75 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -2036,7 +2036,7 @@ void CompilerDriver::InstructionSetToLLVMTarget(InstructionSet instruction_set, bool CompilerDriver::SkipCompilation(const std::string& method_name) { if (!profile_ok_) { - return true; + return false; } // Methods that comprise topKPercentThreshold % of the total samples will be compiled. double topKPercentThreshold = 90.0; diff --git a/runtime/profiler.cc b/runtime/profiler.cc index 77e7316fb2..7b117f4656 100644 --- a/runtime/profiler.cc +++ b/runtime/profiler.cc @@ -588,7 +588,7 @@ bool ProfileHelper::LoadProfileMap(ProfileMap& profileMap, const std::string& fi return false; } if (st.st_size == 0) { - return true; // empty profiles are ok. + return false; // Empty profiles are invalid. } std::ifstream in(fileName.c_str()); if (!in) { |