diff options
-rw-r--r-- | Android.mk | 14 | ||||
-rw-r--r-- | src/class_linker.cc | 8 | ||||
-rw-r--r-- | src/common_test.h | 18 | ||||
-rw-r--r-- | src/compiler/llvm/llvm_compilation_unit.cc | 2 | ||||
-rw-r--r-- | src/dex2oat.cc | 2 | ||||
-rw-r--r-- | src/heap.cc | 4 | ||||
-rw-r--r-- | src/native/dalvik_system_DexFile.cc | 2 | ||||
-rw-r--r-- | src/utils.cc | 22 | ||||
-rw-r--r-- | src/utils.h | 8 | ||||
-rwxr-xr-x | test/etc/host-run-test-jar | 2 | ||||
-rwxr-xr-x | test/etc/push-and-run-test-jar | 2 | ||||
-rwxr-xr-x | tools/art | 2 |
12 files changed, 43 insertions, 43 deletions
@@ -73,8 +73,8 @@ clean-oat-host: rm -f $(ART_NATIVETEST_OUT)/*.art rm -f $(ART_TEST_OUT)/*.oat rm -f $(ART_TEST_OUT)/*.art - rm -f $(ART_CACHE_OUT)/*.oat - rm -f $(ART_CACHE_OUT)/*.art + rm -f $(DALVIK_CACHE_OUT)/*.oat + rm -f $(DALVIK_CACHE_OUT)/*.art rm -f $(HOST_OUT_JAVA_LIBRARIES)/*.oat rm -f $(HOST_OUT_JAVA_LIBRARIES)/*.art rm -f $(TARGET_OUT_JAVA_LIBRARIES)/*.oat @@ -83,7 +83,7 @@ clean-oat-host: rm -f $(TARGET_OUT_APPS)/*.oat rm -f $(TARGET_OUT_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/javalib.jar.oat rm -f $(TARGET_OUT_INTERMEDIATES)/APPS/*_intermediates/*.apk.oat - rm -rf /tmp/test-*/art-cache/*.oat + rm -rf /tmp/test-*/dalvik-cache/*.oat .PHONY: clean-oat-target clean-oat-target: @@ -92,12 +92,12 @@ clean-oat-target: adb shell rm $(ART_NATIVETEST_DIR)/*.art adb shell rm $(ART_TEST_DIR)/*.oat adb shell rm $(ART_TEST_DIR)/*.art - adb shell rm $(ART_CACHE_DIR)/*.oat - adb shell rm $(ART_CACHE_DIR)/*.art + adb shell rm $(DALVIK_CACHE_DIR)/*.oat + adb shell rm $(DALVIK_CACHE_DIR)/*.art adb shell rm $(DEXPREOPT_BOOT_JAR_DIR)/*.oat adb shell rm $(DEXPREOPT_BOOT_JAR_DIR)/*.art adb shell rm system/app/*.oat - adb shell rm data/run-test/test-*/art-cache/*.oat + adb shell rm data/run-test/test-*/dalvik-cache/*.oat ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86) art_dont_bother := true @@ -266,7 +266,7 @@ OAT_TARGET_TARGETS := # $(1): input jar or apk target location define declare-oat-target-target ifneq (,$(filter $(1),$(addprefix system/app/,$(addsuffix .apk,$(PRODUCT_DEX_PREOPT_PACKAGES_IN_DATA))))) -OUT_OAT_FILE := $(call art-cache-out,$(1).oat) +OUT_OAT_FILE := $(call dalvik-cache-out,$(1).oat) else OUT_OAT_FILE := $(PRODUCT_OUT)/$(1).oat endif diff --git a/src/class_linker.cc b/src/class_linker.cc index cfad9d1..85bd9f6 100644 --- a/src/class_linker.cc +++ b/src/class_linker.cc @@ -884,9 +884,9 @@ const DexFile* ClassLinker::FindDexFileInOatFileFromDexLocation(const std::strin return dex_file; } } - // Look for an existing file in the art-cache, validating the result if found - // not found in /foo/bar/baz.oat? try /data/art-cache/foo@bar@baz.oat - std::string cache_location(GetArtCacheFilenameOrDie(oat_filename)); + // Look for an existing file in the dalvik-cache, validating the result if found + // not found in /foo/bar/baz.oat? try /data/dalvik-cache/foo@bar@baz.oat + std::string cache_location(GetDalvikCacheFilenameOrDie(oat_filename)); oat_file = FindOatFileFromOatLocationLocked(cache_location); if (oat_file != NULL) { uint32_t dex_location_checksum; @@ -907,7 +907,7 @@ const DexFile* ClassLinker::FindDexFileInOatFileFromDexLocation(const std::strin LOG(INFO) << "Failed to open oat file from " << oat_filename << " or " << cache_location << "."; // Try to generate oat file if it wasn't found or was obsolete. - std::string oat_cache_filename(GetArtCacheFilenameOrDie(oat_filename)); + std::string oat_cache_filename(GetDalvikCacheFilenameOrDie(oat_filename)); return FindOrCreateOatFileForDexLocationLocked(dex_location, oat_cache_filename); } diff --git a/src/common_test.h b/src/common_test.h index a40537f..3baa77c 100644 --- a/src/common_test.h +++ b/src/common_test.h @@ -265,8 +265,8 @@ class CommonTest : public testing::Test { setenv("LD_LIBRARY_PATH", ":", 0); // Required by java.lang.System.<clinit>. } - // On target, Cannot use /mnt/sdcard because it is mounted noexec, so use subdir of art-cache - android_data = (IsHost() ? "/tmp/art-data-XXXXXX" : "/data/art-cache/art-data-XXXXXX"); + // On target, Cannot use /mnt/sdcard because it is mounted noexec, so use subdir of dalvik-cache + android_data = (IsHost() ? "/tmp/art-data-XXXXXX" : "/data/dalvik-cache/art-data-XXXXXX"); if (mkdtemp(&android_data[0]) == NULL) { PLOG(FATAL) << "mkdtemp(\"" << &android_data[0] << "\") failed"; } @@ -280,9 +280,9 @@ class CommonTest : public testing::Test { virtual void SetUp() { SetEnvironmentVariables(android_data_); - art_cache_.append(android_data_.c_str()); - art_cache_.append("/art-cache"); - int mkdir_result = mkdir(art_cache_.c_str(), 0700); + dalvik_cache_.append(android_data_.c_str()); + dalvik_cache_.append("/dalvik-cache"); + int mkdir_result = mkdir(dalvik_cache_.c_str(), 0700); ASSERT_EQ(mkdir_result, 0); java_lang_dex_file_ = DexFile::Open(GetLibCoreDexFileName(), GetLibCoreDexFileName()); @@ -360,21 +360,21 @@ class CommonTest : public testing::Test { virtual void TearDown() { const char* android_data = getenv("ANDROID_DATA"); ASSERT_TRUE(android_data != NULL); - DIR* dir = opendir(art_cache_.c_str()); + DIR* dir = opendir(dalvik_cache_.c_str()); ASSERT_TRUE(dir != NULL); dirent* e; while ((e = readdir(dir)) != NULL) { if ((strcmp(e->d_name, ".") == 0) || (strcmp(e->d_name, "..") == 0)) { continue; } - std::string filename(art_cache_); + std::string filename(dalvik_cache_); filename.push_back('/'); filename.append(e->d_name); int unlink_result = unlink(filename.c_str()); ASSERT_EQ(0, unlink_result); } closedir(dir); - int rmdir_cache_result = rmdir(art_cache_.c_str()); + int rmdir_cache_result = rmdir(dalvik_cache_.c_str()); ASSERT_EQ(0, rmdir_cache_result); int rmdir_data_result = rmdir(android_data_.c_str()); ASSERT_EQ(0, rmdir_data_result); @@ -514,7 +514,7 @@ class CommonTest : public testing::Test { } std::string android_data_; - std::string art_cache_; + std::string dalvik_cache_; const DexFile* java_lang_dex_file_; // owned by runtime_ const DexFile* conscrypt_file_; // owned by runtime_ std::vector<const DexFile*> boot_class_path_; diff --git a/src/compiler/llvm/llvm_compilation_unit.cc b/src/compiler/llvm/llvm_compilation_unit.cc index 8a674c0..dfb5724 100644 --- a/src/compiler/llvm/llvm_compilation_unit.cc +++ b/src/compiler/llvm/llvm_compilation_unit.cc @@ -146,7 +146,7 @@ InstructionSet LlvmCompilationUnit::GetInstructionSet() const { static std::string DumpDirectory() { if (kIsTargetBuild) { - return GetArtCacheOrDie(GetAndroidData()); + return GetDalvikCacheOrDie(GetAndroidData()); } return "/tmp"; } diff --git a/src/dex2oat.cc b/src/dex2oat.cc index 6df381e..ad751d0 100644 --- a/src/dex2oat.cc +++ b/src/dex2oat.cc @@ -90,7 +90,7 @@ static void Usage(const char* fmt, ...) { UsageError(""); UsageError(" --oat-location=<oat-name>: specifies a symbolic name for the file corresponding"); UsageError(" to the file descriptor specified by --oat-fd."); - UsageError(" Example: --oat-location=/data/art-cache/system@app@Calculator.apk.oat"); + UsageError(" Example: --oat-location=/data/dalvik-cache/system@app@Calculator.apk.oat"); UsageError(""); UsageError(" --oat-symbols=<file.oat>: specifies the oat output destination with full symbols."); UsageError(" Example: --oat-symbols=/symbols/system/framework/boot.oat"); diff --git a/src/heap.cc b/src/heap.cc index e6d3a81..f39c26e 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -211,10 +211,10 @@ Heap::Heap(size_t initial_size, size_t growth_limit, size_t min_free, size_t max // If the /system file exists, it should be up-to-date, don't try to generate image_space = ImageSpace::Create(image_file_name); } else { - // If the /system file didn't exist, we need to use one from the art-cache. + // If the /system file didn't exist, we need to use one from the dalvik-cache. // If the cache file exists, try to open, but if it fails, regenerate. // If it does not exist, generate. - image_file_name = GetArtCacheFilenameOrDie(image_file_name); + image_file_name = GetDalvikCacheFilenameOrDie(image_file_name); if (OS::FileExists(image_file_name.c_str())) { image_space = ImageSpace::Create(image_file_name); } diff --git a/src/native/dalvik_system_DexFile.cc b/src/native/dalvik_system_DexFile.cc index 32056ca..c49e017 100644 --- a/src/native/dalvik_system_DexFile.cc +++ b/src/native/dalvik_system_DexFile.cc @@ -240,7 +240,7 @@ static jboolean DexFile_isDexOptNeeded(JNIEnv* env, jclass, jstring javaFilename } // Check if we have an oat file in the cache - std::string cache_location(GetArtCacheFilenameOrDie(oat_filename)); + std::string cache_location(GetDalvikCacheFilenameOrDie(oat_filename)); oat_file.reset(OatFile::Open(cache_location, oat_filename, NULL)); if (oat_file.get() == NULL) { LOG(INFO) << "DexFile_isDexOptNeeded cache file " << cache_location diff --git a/src/utils.cc b/src/utils.cc index 94d812c..bb83802 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -1184,32 +1184,32 @@ const char* GetAndroidData() { return android_data; } -std::string GetArtCacheOrDie(const char* android_data) { - std::string art_cache(StringPrintf("%s/art-cache", android_data)); +std::string GetDalvikCacheOrDie(const char* android_data) { + std::string dalvik_cache(StringPrintf("%s/dalvik-cache", android_data)); - if (!OS::DirectoryExists(art_cache.c_str())) { - if (StartsWith(art_cache, "/tmp/")) { - int result = mkdir(art_cache.c_str(), 0700); + if (!OS::DirectoryExists(dalvik_cache.c_str())) { + if (StartsWith(dalvik_cache, "/tmp/")) { + int result = mkdir(dalvik_cache.c_str(), 0700); if (result != 0) { - LOG(FATAL) << "Failed to create art-cache directory " << art_cache; + LOG(FATAL) << "Failed to create dalvik-cache directory " << dalvik_cache; return ""; } } else { - LOG(FATAL) << "Failed to find art-cache directory " << art_cache; + LOG(FATAL) << "Failed to find dalvik-cache directory " << dalvik_cache; return ""; } } - return art_cache; + return dalvik_cache; } -std::string GetArtCacheFilenameOrDie(const std::string& location) { - std::string art_cache(GetArtCacheOrDie(GetAndroidData())); +std::string GetDalvikCacheFilenameOrDie(const std::string& location) { + std::string dalvik_cache(GetDalvikCacheOrDie(GetAndroidData())); if (location[0] != '/') { LOG(FATAL) << "Expected path in location to be absolute: "<< location; } std::string cache_file(location, 1); // skip leading slash std::replace(cache_file.begin(), cache_file.end(), '/', '@'); - return art_cache + "/" + cache_file; + return dalvik_cache + "/" + cache_file; } bool IsValidZipFilename(const std::string& filename) { diff --git a/src/utils.h b/src/utils.h index d808fc3..e5028ba 100644 --- a/src/utils.h +++ b/src/utils.h @@ -338,11 +338,11 @@ const char* GetAndroidRoot(); // Find $ANDROID_DATA, /data, or abort const char* GetAndroidData(); -// Returns the art-cache location, or dies trying. -std::string GetArtCacheOrDie(const char* android_data); +// Returns the dalvik-cache location, or dies trying. +std::string GetDalvikCacheOrDie(const char* android_data); -// Returns the art-cache location for a DexFile or OatFile, or dies trying. -std::string GetArtCacheFilenameOrDie(const std::string& location); +// Returns the dalvik-cache location for a DexFile or OatFile, or dies trying. +std::string GetDalvikCacheFilenameOrDie(const std::string& location); // Check whether the given filename has a valid extension bool IsValidZipFilename(const std::string& filename); diff --git a/test/etc/host-run-test-jar b/test/etc/host-run-test-jar index 1629953..f8f393f 100755 --- a/test/etc/host-run-test-jar +++ b/test/etc/host-run-test-jar @@ -66,7 +66,7 @@ done msg "------------------------------" -mkdir $DEX_LOCATION/art-cache +mkdir $DEX_LOCATION/dalvik-cache [[ $? -ne 0 ]] && exit export ANDROID_PRINTF_LOG=brief diff --git a/test/etc/push-and-run-test-jar b/test/etc/push-and-run-test-jar index b1dddfc..1e653e2 100755 --- a/test/etc/push-and-run-test-jar +++ b/test/etc/push-and-run-test-jar @@ -128,7 +128,7 @@ fi JNI_OPTS="-Xjnigreflimit:512 -Xcheck:jni" -cmdline="cd $DEX_LOCATION && mkdir art-cache && export ANDROID_DATA=$DEX_LOCATION && export DEX_LOCATION=$DEX_LOCATION && \ +cmdline="cd $DEX_LOCATION && mkdir dalvik-cache && export ANDROID_DATA=$DEX_LOCATION && export DEX_LOCATION=$DEX_LOCATION && \ $INVOKE_WITH $gdb $OATEXEC $gdbargs $ZYGOTE $JNI_OPTS $INT_OPTS $DEBUG_OPTS -Ximage:/data/art-test/core.art -cp $DEX_LOCATION/$TEST_NAME.jar Main" if [ "$DEV_MODE" = "y" ]; then echo $cmdline "$@" @@ -34,7 +34,7 @@ while true; do done unset ANDROID_PRODUCT_OUT # avoid defaulting dex2oat --host-prefix to target output -mkdir -p /tmp/android-data/art-cache +mkdir -p /tmp/android-data/dalvik-cache cd $ANDROID_BUILD_TOP ANDROID_DATA=/tmp/android-data \ ANDROID_ROOT=$ANDROID_HOST_OUT \ |