
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. In zygote child processes, this is only possible after mojo's IPC support is brought up, because the mojo broker has to create the buffer on the process's behalf (the zygote sandbox prevents the child processes from doing this themselves). To prepare for the startup tracing refactor, this patch moves startup tracing initialization for zygote child processes from ContentMainRunner to their respective main functions, until after mojo is brought up by the respective ChildThreadImpl subclass. We should only lose minimal tracing data due to this change (from the early part of the respective main function), and only from zygote children (primarily renderer + utility processes) on Linux/ChromeOS. [1] https://docs.google.com/document/d/1FygJQbD29vMkfVfT7m0Lb1u1zZZU1VgXAPi_R0uBoTw/edit?usp=sharing Bug: 1006753 Change-Id: I59c21b2b383c755925dc5ff0c19160985e089800 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2038574 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org> Commit-Queue: Eric Seckler <eseckler@chromium.org> Cr-Commit-Position: refs/heads/master@{#739869}