| Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
|
| diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
|
| index 2e3208fe2ef41d1689b1a1d1c2a03bccf14bf035..3ed602644a5aa45cfcd29c2d7a07c9d6d084682d 100644
|
| --- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
|
| +++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
|
| @@ -25,6 +25,7 @@ import org.chromium.base.BaseSwitches;
|
| import org.chromium.base.CommandLine;
|
| import org.chromium.base.ContentUriUtils;
|
| import org.chromium.base.MemoryPressureListener;
|
| +import org.chromium.base.TraceEvent;
|
| import org.chromium.base.VisibleForTesting;
|
| import org.chromium.base.annotations.SuppressFBWarnings;
|
| import org.chromium.base.library_loader.LibraryProcessType;
|
| @@ -116,9 +117,15 @@ public class ChromeShellActivity extends ActionBarActivity implements AppMenuPro
|
| @Override
|
| @SuppressFBWarnings("DM_EXIT")
|
| protected void onCreate(final Bundle savedInstanceState) {
|
| + // Enable tracing as early as possible if required
|
| + ContentApplication.initCommandLine(this);
|
| + if (CommandLine.getInstance().hasSwitch("trace-startup")) {
|
| + TraceEvent.enableEarlyTracing();
|
| + }
|
| + TraceEvent.begin("ChromeShellActivity.onCreate");
|
| +
|
| super.onCreate(savedInstanceState);
|
|
|
| - ContentApplication.initCommandLine(this);
|
| waitForDebuggerIfNeeded();
|
|
|
| DeviceUtils.addDeviceSpecificUserAgentSwitch(this);
|
| @@ -145,6 +152,8 @@ public class ChromeShellActivity extends ActionBarActivity implements AppMenuPro
|
| } catch (ProcessInitException e) {
|
| Log.e(TAG, "Unable to load native library.", e);
|
| System.exit(-1);
|
| + } finally {
|
| + TraceEvent.end("ChromeShellActivity.onCreate");
|
| }
|
| }
|
|
|
|
|