tracing: Enable startup tracing on Android only after mojo is inited
We're refactoring startup tracing in Chrome, see design doc[1]. With the new startup tracing architecture, each process needs to allocate a shared memory buffer when enabling startup tracing. This is only supported after mojo was initialized for the process. On Android, we were previously enabling startup tracing right after the native library is loaded. At this point, mojo is not ready yet. To prepare for the startup tracing refactor, this patch moves startup tracing initialization on android to ContentMainRunnerImpl::Initialize, which is called after mojo was initialized by Main() in //services/service_manager/embedder/main.cc. We should only lose minimal tracing data due to this, since ContentMainRunnerImpl::Initialize is still very early during startup, and this doesn't affect recording of even earlier java events. [1] https://docs.google.com/document/d/1FygJQbD29vMkfVfT7m0Lb1u1zZZU1VgXAPi_R0uBoTw/edit?usp=sharing Bug: 1006753 Change-Id: I89aa292b3010bb501b42bd0bd735f8df75cea557 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036188Reviewed-by:Ken Rockot <rockot@google.com> Reviewed-by:
Scott Violet <sky@chromium.org> Reviewed-by:
Sami Kyöstilä <skyostil@chromium.org> Commit-Queue: Eric Seckler <eseckler@chromium.org> Cr-Commit-Position: refs/heads/master@{#738881}
Showing
Please register or sign in to comment