summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorAnwar Ghuloum <anwarg@google.com>2013-09-19 17:29:21 -0700
committerAnwar Ghuloum <anwarg@google.com>2013-09-19 17:34:13 -0700
commitcaacdf326cfe09decfca0a15c62ebe10b774e05e (patch)
treed1f0fe587a4d19ba613226fdbde8c3b9f87d70b4 /runtime
parent0f72e4136aecaf6976fdb55916bbd7b6d5c9c77b (diff)
downloadart-caacdf326cfe09decfca0a15c62ebe10b774e05e.zip
art-caacdf326cfe09decfca0a15c62ebe10b774e05e.tar.gz
art-caacdf326cfe09decfca0a15c62ebe10b774e05e.tar.bz2
Fix dumpsys meminfo for art
BUG:10112253 Change-Id: I2a34cc0841bdcf922c4ab4eadda360313858a0d6
Diffstat (limited to 'runtime')
-rw-r--r--runtime/utils.cc6
-rw-r--r--runtime/utils.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc
index 4c17914..dcfe8a7 100644
--- a/runtime/utils.cc
+++ b/runtime/utils.cc
@@ -1196,7 +1196,7 @@ std::string GetDalvikCacheFilenameOrDie(const std::string& location) {
LOG(FATAL) << "Expected path in location to be absolute: "<< location;
}
std::string cache_file(location, 1); // skip leading slash
- if (!IsValidDexFilename(location)) {
+ if (!IsValidDexFilename(location) && !IsValidImageFilename(location)) {
cache_file += "/";
cache_file += DexFile::kClassesDex;
}
@@ -1216,6 +1216,10 @@ bool IsValidDexFilename(const std::string& filename) {
return EndsWith(filename, ".dex");
}
+bool IsValidImageFilename(const std::string& filename) {
+ return EndsWith(filename, ".art");
+}
+
bool IsValidOatFilename(const std::string& filename) {
return (EndsWith(filename, ".odex") ||
EndsWith(filename, ".dex") ||
diff --git a/runtime/utils.h b/runtime/utils.h
index fcbb992..c506fba 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -356,6 +356,7 @@ std::string GetDalvikCacheFilenameOrDie(const std::string& location);
// Check whether the given filename has a valid extension
bool IsValidZipFilename(const std::string& filename);
bool IsValidDexFilename(const std::string& filename);
+bool IsValidImageFilename(const std::string& filename);
bool IsValidOatFilename(const std::string& filename);
class VoidFunctor {