Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4666)

Unified Diff: base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java

Issue 1001343002: Prefetch the native library from native code by parsing /proc/pid/maps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
index 484c6bc56d55596cdf77610e3cbf8e541c4d3d67..ed204cecebe05fc80dd6945e7ac1a369e0308c2f 100644
--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
@@ -573,4 +573,10 @@ public class LibraryLoader {
// Get the version of the native library. This is needed so that we can check we
// have the right version before initializing the (rest of the) JNI.
private native String nativeGetVersionNumber();
+
+ // Finds the ranges corresponding to the native library pages and then forks
+ // a new process to prefetch these pages. The new process then
+ // terminates. Note that getting the ranges involves file operations in
+ // /proc/ and is done in the calling thread of the original process.
+ public static native void nativeForkAndPrefetchNativeLibrary();
}
« no previous file with comments | « no previous file | base/android/library_loader/library_loader_hooks.cc » ('j') | base/android/library_loader/library_prefetcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698