Add profiling process control channel

Desktop / Chromium - Brett Wilson [chromium.org] - 12 July 2017 18:29 EDT

This new Mojo channel connects the profiling process and the browser process. It should be run only when the enable_oop_heap_profiling is enabled, and when run with --memlog.

Fixes a bug on Posix memlog streams because sendmsg is not atomic for large messages.

Various refactoring of the profiling process. The separate IO thread has been removed and the main thread is now the IO thread.

NOPRESUBMIT=true (seems to crash presubmit checks, bug filed)

Change-Id: I93909bb95bfbd10348c0c7d51c80aa44cb26f7aa Reviewed-on: https://chromium-review.googlesource.com/564157 Commit-Queue: Brett Wilson

79b69b2 Add profiling process control channel.
chrome/app/chrome_main.cc | 2 +-
chrome/browser/chrome_content_browser_client.cc | 9 +-
chrome/browser/profiling_host/DEPS | 3 +
.../profiling_host/profiling_process_host.cc | 103 +++++++++++++++------
.../profiling_host/profiling_process_host.h | 24 +++++
chrome/common/profiling/BUILD.gn | 10 ++
chrome/common/profiling/OWNERS | 2 +
chrome/common/profiling/memlog_allocator_shim.cc | 16 +++-
chrome/common/profiling/memlog_sender.cc | 21 ++++-
chrome/common/profiling/memlog_sender.h | 8 ++
chrome/common/profiling/memlog_sender_pipe_win.cc | 12 ++-
chrome/common/profiling/memlog_sender_pipe_win.h | 4 +-
chrome/common/profiling/memlog_stream.h | 12 ++-
chrome/common/profiling/profiling_constants.cc | 11 +++
chrome/common/profiling/profiling_constants.h | 15 +++
chrome/common/profiling/profiling_control.mojom | 12 +++
chrome/profiling/BUILD.gn | 2 +
chrome/profiling/memlog_connection_manager.cc | 16 +++-
chrome/profiling/memlog_connection_manager.h | 8 +-
chrome/profiling/memlog_control_receiver.h | 19 ++++
chrome/profiling/memlog_stream_parser.cc | 37 ++++++--
chrome/profiling/memlog_stream_parser.h | 14 ++-
chrome/profiling/profiling_globals.cc | 44 +++------
chrome/profiling/profiling_globals.h | 24 +++--
chrome/profiling/profiling_main.cc | 12 ++-
chrome/profiling/profiling_process.cc | 33 +++++++
chrome/profiling/profiling_process.h | 42 +++++++++
27 files changed, 409 insertions(+), 106 deletions(-)

Upstream: git.chromium.org


  • Share