Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9fba980 authored by Yasuhiro Matsuda's avatar Yasuhiro Matsuda Committed by Android Git Automerger
Browse files

am e651ee9b: am 10191dd9: am 53f1a815: Merge "Remove unnecessary finally blocks for tracing."

* commit 'e651ee9b':
  Remove unnecessary finally blocks for tracing.
parents fef961cc e651ee9b
Loading
Loading
Loading
Loading
+44 −57
Original line number Diff line number Diff line
@@ -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,
@@ -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 + "...");
                    }
@@ -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 "
@@ -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;
@@ -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.