Add heap allocator usage to task profiler.
This enables heap tracking in the task profiler (chrome://profiler) under a build flag, which is enabled for developer builds, but disabled for official builds for now.
As-is, this surfaces the following heap metrics per task by default:
- Avg number of allocations per run.
- Avg number of frees per run.
- Avg net bytes allocated (or freed if negative).
- Max allocated bytes at any time in any run.
This is a high-watermark for memory usage in the task.
Additionally it's possible to enable the following metrics by ticking a checkbox in chrome://profiler:
- Allocation count.
- Free count.
A running count of how many allocations and frees a task
has performed in all runs.
- Allocated bytes.
- Freed bytes.
A running tally of how many bytes a task has allocated and
freed in all runs.
- Overhead bytes.
An estimate of how many allocated bytes go to heap overhead.
This might be helpful to guide implementation to use larger
allocations or chunked data structures like std::vector
BUG=644385
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2386123003
Cr-Commit-Position: refs/heads/master@{#436003}
11 files changed