Preload DexCaches
Bug: 11045348
Change-Id: Idbd6ad284964035a3fcf1ec360a3490f32f99d42
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index 8f19e3a..af900c8 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -241,7 +241,9 @@
public native void trimHeap();
public native void concurrentGC();
- public void preloadDexCaches() {
- // Do nothing with ART, image generation already does this.
- }
+ /**
+ * Fill in dex caches with classes, fields, and methods that are
+ * already loaded. Typically used after Zygote preloading.
+ */
+ public native void preloadDexCaches();
}
diff --git a/libdvm/src/main/java/dalvik/system/VMRuntime.java b/libdvm/src/main/java/dalvik/system/VMRuntime.java
index e1b4a00..ca1c8aa 100644
--- a/libdvm/src/main/java/dalvik/system/VMRuntime.java
+++ b/libdvm/src/main/java/dalvik/system/VMRuntime.java
@@ -239,7 +239,8 @@
public native void registerNativeFree(int bytes);
/**
- * Fill in dex caches with classes, fields, and methods that are already loaded.
+ * Fill in dex caches with classes, fields, and methods that are
+ * already loaded. Typically used after Zygote preloading.
*/
public native void preloadDexCaches();
}