summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-10-07 17:47:45 -0700
committerBrian Carlstrom <bdc@google.com>2013-10-08 17:11:18 -0700
commitc8cfc667ddb82b08b889a24831a3d00cc6490bd9 (patch)
treea0bcfdf2e21814806626fcf8269cd341843f8dcc
parent34b971519e8d2689a26d0764d468fe4ad7346169 (diff)
downloadlibcore-c8cfc667ddb82b08b889a24831a3d00cc6490bd9.zip
libcore-c8cfc667ddb82b08b889a24831a3d00cc6490bd9.tar.gz
libcore-c8cfc667ddb82b08b889a24831a3d00cc6490bd9.tar.bz2
Preload DexCaches
Bug: 11045348 Change-Id: I3025d8f95e157af602b0ae91d974cb5e6678fb3d
-rw-r--r--libart/src/main/java/dalvik/system/VMRuntime.java4
-rw-r--r--libdvm/src/main/java/dalvik/system/VMRuntime.java5
2 files changed, 9 insertions, 0 deletions
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index 19e18da..8f19e3a 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -240,4 +240,8 @@ public final class VMRuntime {
public native void trimHeap();
public native void concurrentGC();
+
+ public void preloadDexCaches() {
+ // Do nothing with ART, image generation already does this.
+ }
}
diff --git a/libdvm/src/main/java/dalvik/system/VMRuntime.java b/libdvm/src/main/java/dalvik/system/VMRuntime.java
index cd4a9db..e1b4a00 100644
--- a/libdvm/src/main/java/dalvik/system/VMRuntime.java
+++ b/libdvm/src/main/java/dalvik/system/VMRuntime.java
@@ -237,4 +237,9 @@ public final class VMRuntime {
* Registers a native free by reducing the number of native bytes accounted for.
*/
public native void registerNativeFree(int bytes);
+
+ /**
+ * Fill in dex caches with classes, fields, and methods that are already loaded.
+ */
+ public native void preloadDexCaches();
}