Implement a ScopedThreadHeapUsage class to allow profiling per-thread heap usage.
This uses the generic allocator shim to hook into heap allocations. When disabled and unused, there is no runtime penalty for this. When heap tracing is enabled, there's a small accounting overhead for every allocation. Instantiating a ScopedThreadHeapUsage instance carries O(1) cost, whether or not heap tracing is enabled. BUG=644385 Review-Url: https://codereview.chromium.org/2163783003 Cr-Commit-Position: refs/heads/master@{#417601}
Showing
This diff is collapsed.
Please register or sign in to comment