Loading core/java/com/android/internal/os/ZygoteInit.java +44 −57 Original line number Diff line number Diff line Loading @@ -179,19 +179,15 @@ public class ZygoteInit { static void preload() { Log.d(TAG, "begin preload"); try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadClasses"); preloadClasses(); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadResources"); preloadResources(); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadOpenGL"); preloadOpenGL(); Trace.traceEnd(Trace.TRACE_TAG_DALVIK); preloadSharedLibraries(); preloadTextResources(); // Ask the WebViewFactory to do any initialization that must run in the zygote process, Loading Loading @@ -275,8 +271,8 @@ public class ZygoteInit { continue; } try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadClass " + line); try { if (false) { Log.v(TAG, "Preloading " + line + "..."); } Loading @@ -300,9 +296,8 @@ public class ZygoteInit { throw (RuntimeException) t; } throw new RuntimeException(t); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } Log.i(TAG, "...preloaded " + count + " classes in " Loading Loading @@ -578,16 +573,15 @@ public class ZygoteInit { } public static void main(String argv[]) { try { boolean startSystemServer = false; String socketName = "zygote"; String abiList = null; try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "ZygoteInit"); RuntimeInit.enableDdms(); // Start profiling the zygote initialization. SamplingProfilerIntegration.start(); boolean startSystemServer = false; String socketName = "zygote"; String abiList = null; for (int i = 1; i < argv.length; i++) { if ("start-system-server".equals(argv[i])) { startSystemServer = true; Loading @@ -605,30 +599,23 @@ public class ZygoteInit { } registerZygoteSocket(socketName); try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "ZygotePreload"); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_START, SystemClock.uptimeMillis()); preload(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END, SystemClock.uptimeMillis()); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } // Finish profiling the zygote initialization. SamplingProfilerIntegration.writeZygoteSnapshot(); // Do an initial gc to clean up after startup try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PostZygoteInitGC"); gcAndFinalize(); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } // Disable tracing so that forked processes do not inherit stale tracing tags from // Zygote. Loading Loading
core/java/com/android/internal/os/ZygoteInit.java +44 −57 Original line number Diff line number Diff line Loading @@ -179,19 +179,15 @@ public class ZygoteInit { static void preload() { Log.d(TAG, "begin preload"); try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadClasses"); preloadClasses(); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadResources"); preloadResources(); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadOpenGL"); preloadOpenGL(); Trace.traceEnd(Trace.TRACE_TAG_DALVIK); preloadSharedLibraries(); preloadTextResources(); // Ask the WebViewFactory to do any initialization that must run in the zygote process, Loading Loading @@ -275,8 +271,8 @@ public class ZygoteInit { continue; } try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadClass " + line); try { if (false) { Log.v(TAG, "Preloading " + line + "..."); } Loading @@ -300,9 +296,8 @@ public class ZygoteInit { throw (RuntimeException) t; } throw new RuntimeException(t); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } Log.i(TAG, "...preloaded " + count + " classes in " Loading Loading @@ -578,16 +573,15 @@ public class ZygoteInit { } public static void main(String argv[]) { try { boolean startSystemServer = false; String socketName = "zygote"; String abiList = null; try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "ZygoteInit"); RuntimeInit.enableDdms(); // Start profiling the zygote initialization. SamplingProfilerIntegration.start(); boolean startSystemServer = false; String socketName = "zygote"; String abiList = null; for (int i = 1; i < argv.length; i++) { if ("start-system-server".equals(argv[i])) { startSystemServer = true; Loading @@ -605,30 +599,23 @@ public class ZygoteInit { } registerZygoteSocket(socketName); try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "ZygotePreload"); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_START, SystemClock.uptimeMillis()); preload(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END, SystemClock.uptimeMillis()); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } // Finish profiling the zygote initialization. SamplingProfilerIntegration.writeZygoteSnapshot(); // Do an initial gc to clean up after startup try { Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PostZygoteInitGC"); gcAndFinalize(); } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } } finally { Trace.traceEnd(Trace.TRACE_TAG_DALVIK); } // Disable tracing so that forked processes do not inherit stale tracing tags from // Zygote. Loading