diff options
| author | 2013-09-19 17:29:21 -0700 | |
|---|---|---|
| committer | 2013-09-19 17:34:13 -0700 | |
| commit | caacdf326cfe09decfca0a15c62ebe10b774e05e (patch) | |
| tree | d1f0fe587a4d19ba613226fdbde8c3b9f87d70b4 /runtime/utils.cc | |
| parent | 0f72e4136aecaf6976fdb55916bbd7b6d5c9c77b (diff) | |
Fix dumpsys meminfo for art
BUG:10112253
Change-Id: I2a34cc0841bdcf922c4ab4eadda360313858a0d6
Diffstat (limited to 'runtime/utils.cc')
| -rw-r--r-- | runtime/utils.cc | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc index 4c17914265..dcfe8a75c2 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") ||  |