summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nick Kralevich <nnk@google.com> 2014-06-12 23:05:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-06-10 21:49:56 +0000
commita2b87c252cdbde5302dd5cccd7e16eebe5dbb694 (patch)
tree9785ce4ae11daf2c55501476c01fa2bcdbb5d45e
parent092ce603c8bc9188d63eb8e9defc321017a098f3 (diff)
parent7bfa86ddf31a961a61e2994fe771345acd1717b4 (diff)
Merge "consolidate profiles and profile-cache"
-rw-r--r--runtime/native/dalvik_system_DexFile.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index 7e3810cd18..9512a5a7f5 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -340,16 +340,7 @@ static jboolean IsDexOptNeededInternal(JNIEnv* env, const char* filename,
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",
- false /* create_if_absent */);
-
- // Make the profile cache if it doesn't exist.
- mkdir(profile_cache_dir.c_str(), 0700);
-
- // The previous profile file (a copy of the profile the last time this was run) is
- // in the dalvik-cache directory because this is owned by system. The profiles
- // directory is owned by install so system cannot write files in there.
- std::string prev_profile_file = profile_cache_dir + std::string("/") + pkgname;
+ const std::string prev_profile_file = profile_file + std::string("@old");
struct stat profstat, prevstat;
int e1 = stat(profile_file.c_str(), &profstat);