Reland of [tracing] Send unique tracing process id for cross-process memory dumps...
commit72c5d682a034962b137456b6c8f6f5317f70fcd4
authorssid <ssid@chromium.org>
Fri, 26 Jun 2015 15:51:42 +0000 (26 08:51 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Jun 2015 15:52:19 +0000 (26 15:52 +0000)
tree2f380f92f24e3826b5e7c5cfc945b7b8345fccb8
parentaadb5cde66e61917a7cbfd9043aa923f4d9d1a18
Reland of [tracing] Send unique tracing process id for cross-process memory dumps identification.

This is a reland of crrev.com/1173263004.
The original CL was reverted because of a static initializer. This CL
replaces the static initializer with constant 0 and the id is always
ensured to be positive and cannot be equal to invalid id.

Original message:

The memory shared between browser and renderer must be identified with
the same unique id for memory dumps in tracing. Currently the child
process is not aware of its unique child process id. But, the child
process id cannot be exposed in the child process (see discussion in
crrev.com/1155683009).

So, a hash of the child process id allocated by the browser process is
sent to child process along with begin tracing message and will be
exposed in the child process MemoryDumpManager. The allocator that
needs to create a global guid will use the id to identify memory dumps.

See the design doc https://goo.gl/ncMfUV for more details.

BUG=497726
TBR=jam@chromium.org,dcheng@chromium.org,wittman@chromium.org

Review URL: https://codereview.chromium.org/1212693003

Cr-Commit-Position: refs/heads/master@{#336376}
base/trace_event/memory_dump_manager.cc
base/trace_event/memory_dump_manager.h
components/tracing/child_trace_message_filter.cc
components/tracing/child_trace_message_filter.h
components/tracing/tracing_messages.h
content/browser/browser_child_process_host_impl.cc
content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
content/browser/renderer_host/render_process_host_impl.cc
content/browser/tracing/trace_message_filter.cc
content/browser/tracing/trace_message_filter.h