Mount emulated volumes as consistent location.
We really only support a single emulated volume on the device at a
time, either on internal storage, or moved to a private volume. To
avoid kicking off a giant rescan of all media when moved, keep all
the paths the same when mounted as primary.
Also ensure we have /data/media/0 ready on private volumes.
Bug: 20275423
Change-Id: I0c102f430b865ca7536772b1fae56d8c9660a97a
diff --git a/Benchmark.cpp b/Benchmark.cpp
index 7a3af65..810adf4 100644
--- a/Benchmark.cpp
+++ b/Benchmark.cpp
@@ -28,6 +28,8 @@
#include <sys/resource.h>
#include <unistd.h>
+#define ENABLE_DROP_CACHES 1
+
using android::base::ReadFileToString;
using android::base::WriteStringToFile;
@@ -88,11 +90,13 @@
sync();
nsecs_t create = systemTime(SYSTEM_TIME_BOOTTIME);
+#if ENABLE_DROP_CACHES
LOG(VERBOSE) << "Before drop_caches";
if (!WriteStringToFile("3", "/proc/sys/vm/drop_caches")) {
PLOG(ERROR) << "Failed to drop_caches";
}
LOG(VERBOSE) << "After drop_caches";
+#endif
nsecs_t drop = systemTime(SYSTEM_TIME_BOOTTIME);
BenchmarkRun();