[tracing] Add browser-side discardable memory reporting
commitc255f38d345e32b4634ece005237ab958ddb2099
authorprimiano <primiano@chromium.org>
Wed, 1 Jul 2015 16:17:47 +0000 (1 09:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 1 Jul 2015 16:19:34 +0000 (1 16:19 +0000)
treeb50c2df18834d451286de2212e1748803a09f3ea
parent0c8e0a3222ab83b02c6482309c1c5eaf00106a37
[tracing] Add browser-side discardable memory reporting

This CL introduced two major changes to the discardable dumpers for
memory-infra:
1) Add a browser-side discardable MemoryDumpProvider. This will emit dumps
   on the browser process of the form: discardable/process_X/segment_Y
2) Change both the broswer and child side dumpers to use the memory-infra
   graph API introduced in crbug.com/492102. In essence this make sure
   that when both browser and child process create a dump for the same
   segment, they attach the same guid to that. By doing that, the
   trace-viewer UI can infer that the two segments, that are,
   "discardable/process_X/segment_Y" on the browser and "discardable/segment_Y"
   on the child, refer to the same memory and should be counted only once.
Furthermore this CL introduces fixes the lack of a lock on the discardable
child side.

BUG=497726

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

Cr-Commit-Position: refs/heads/master@{#337030}
base/trace_event/memory_dump_manager.cc
base/trace_event/memory_dump_manager.h
content/child/child_discardable_shared_memory_manager.cc
content/common/discardable_shared_memory_heap.cc
content/common/discardable_shared_memory_heap.h
content/common/host_discardable_shared_memory_manager.cc
content/common/host_discardable_shared_memory_manager.h