summaryrefslogtreecommitdiffstats
path: root/runtime/utils.h
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-04-23 20:24:57 +0100
committerNarayan Kamath <narayan@google.com>2014-05-01 11:25:07 +0100
commit11d9f06a96a6909905c248ed684366190140095c (patch)
tree27b02ab216b98ba1656d66072fd46c5adec61242 /runtime/utils.h
parentb3016551e5f264264dbb633a1ddf03ac97f9c66c (diff)
downloadandroid_art-11d9f06a96a6909905c248ed684366190140095c.tar.gz
android_art-11d9f06a96a6909905c248ed684366190140095c.tar.bz2
android_art-11d9f06a96a6909905c248ed684366190140095c.zip
Use instruction specific dalvik cache dirs.
- All oat & art files are now placed under /data/dalvik-cache/<isa>/. - GetDalvikCacheOrDie now requires a mandatory subdirectory argument, and is implicitly rooted under /data/. - Added helper methods to convert InstructionSet enums into strings and vice versa. (cherry picked from commit 2974bc3d8a5d161d449dd66826d668d87bdc3cbe) Change-Id: Ic7986938e6a7091a2af675ebafec768f7b5fb8cd
Diffstat (limited to 'runtime/utils.h')
-rw-r--r--runtime/utils.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/utils.h b/runtime/utils.h
index 6ab10137b1..4b2f23063b 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -394,11 +394,14 @@ const char* GetAndroidRoot();
// Find $ANDROID_DATA, /data, or abort.
const char* GetAndroidData();
-// Returns the dalvik-cache location, or dies trying.
-std::string GetDalvikCacheOrDie(const char* android_data);
-
-// Returns the dalvik-cache location for a DexFile or OatFile, or dies trying.
-std::string GetDalvikCacheFilenameOrDie(const char* location);
+// Returns the dalvik-cache location, or dies trying. subdir will be
+// appended to the cache location.
+std::string GetDalvikCacheOrDie(const char* subdir, bool create_if_absent = true);
+
+// Returns the absolute dalvik-cache path for a DexFile or OatFile, or
+// dies trying. The path returned will be rooted at cache_location.
+std::string GetDalvikCacheFilenameOrDie(const char* file_location,
+ const char* cache_location);
// Check whether the given magic matches a known file type.
bool IsZipMagic(uint32_t magic);