diff options
author | Dimitry Ivanov <dimitry@google.com> | 2016-02-22 11:22:11 -0800 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2016-02-26 10:25:06 +0000 |
commit | 204386e1c56930cfbc304c91b9a8b4190567e524 (patch) | |
tree | b1d1784166b776462c15170d22616f51d03e2870 /cmds/app_process/app_main.cpp | |
parent | 33e7677665c38507e58245c92101acef01ff302d (diff) |
zygote to preload public native libraries
Preload public native libraries when starting a zygote
This lets other users of libnativeloader (like dex2oat)
avoid unnecessary cold loads of libandroid.so which could
take up to a second.
Bug: http://b/27245894
(cherry picked from commit b0824979be2653ba300382b52c1b1236fd44f0de)
Change-Id: I04a640c104dba5b585a59d63270e81b6c9ad6f7e
Diffstat (limited to 'cmds/app_process/app_main.cpp')
-rw-r--r-- | cmds/app_process/app_main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 2e023825a219..bfcba9aee614 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -20,6 +20,7 @@ #include <cutils/process_name.h> #include <cutils/properties.h> #include <cutils/trace.h> +#include <nativeloader/native_loader.h> #include <android_runtime/AndroidRuntime.h> #include <private/android_filesystem_config.h> // for AID_SYSTEM @@ -304,6 +305,7 @@ int main(int argc, char* const argv[]) } if (zygote) { + PreloadPublicNativeLibraries(); runtime.start("com.android.internal.os.ZygoteInit", args, zygote); } else if (className) { runtime.start("com.android.internal.os.RuntimeInit", args, zygote); |