diff options
author | Calin Juravle <calin@google.com> | 2014-06-06 11:15:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-06 11:15:25 +0000 |
commit | 20aa7cbe93d782e0e756a36e70d610fe84b4bbb4 (patch) | |
tree | cfaaa9770d5ddbc1034b2c9770a12e6ff4d19b7b /runtime/native/dalvik_system_DexFile.cc | |
parent | eab52e3318dd0ab0f357a8420f0a8ccea69d61f1 (diff) | |
parent | c1b643cc6ac45dbd0eabdcd7425c7e86006c27d6 (diff) | |
download | art-20aa7cbe93d782e0e756a36e70d610fe84b4bbb4.zip art-20aa7cbe93d782e0e756a36e70d610fe84b4bbb4.tar.gz art-20aa7cbe93d782e0e756a36e70d610fe84b4bbb4.tar.bz2 |
Merge "Fixed and refactored profiler options handling"
Diffstat (limited to 'runtime/native/dalvik_system_DexFile.cc')
-rw-r--r-- | runtime/native/dalvik_system_DexFile.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc index 6085722..2c24e33 100644 --- a/runtime/native/dalvik_system_DexFile.cc +++ b/runtime/native/dalvik_system_DexFile.cc @@ -328,7 +328,7 @@ static jboolean IsDexOptNeededInternal(JNIEnv* env, const char* filename, // If the 'defer' argument is true then this will be retried later. In this case we // need to make sure that the profile file copy is not made so that we will get the // same result second time. - if (pkgname != nullptr) { + if (Runtime::Current()->GetProfilerOptions().IsEnabled() && (pkgname != nullptr)) { const std::string profile_file = GetDalvikCacheOrDie("profiles", false /* create_if_absent */) + std::string("/") + pkgname; const std::string profile_cache_dir = GetDalvikCacheOrDie("profile-cache", @@ -357,8 +357,8 @@ static jboolean IsDexOptNeededInternal(JNIEnv* env, const char* filename, // There is a previous profile file. Check if the profile has changed significantly. // A change in profile is considered significant if X% (change_thr property) of the top K% // (compile_thr property) samples has changed. - double top_k_threshold = GetDoubleProperty("dalvik.vm.profiler.dex2oat.compile_thr", 10.0, 90.0, 90.0); - double change_threshold = GetDoubleProperty("dalvik.vm.profiler.dex2oat.change_thr", 1.0, 90.0, 10.0); + double top_k_threshold = Runtime::Current()->GetProfilerOptions().GetTopKThreshold(); + double change_threshold = Runtime::Current()->GetProfilerOptions().GetTopKChangeThreshold(); double change_percent = 0.0; ProfileFile new_profile, old_profile; bool new_ok = new_profile.LoadFile(profile_file); |