diff options
author | sque <sque@chromium.org> | 2015-12-08 16:20:54 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-09 00:22:36 +0000 |
commit | 096af097febf8a07d1323593e8cf94e83467ba71 (patch) | |
tree | da81451efd275d284e3e7356a73a0892765627e2 /components/metrics.gypi | |
parent | 2df535152b8023dc3dcbc7dd8c7f1a1e3d959e13 (diff) | |
download | chromium_src-096af097febf8a07d1323593e8cf94e83467ba71.zip chromium_src-096af097febf8a07d1323593e8cf94e83467ba71.tar.gz chromium_src-096af097febf8a07d1323593e8cf94e83467ba71.tar.bz2 |
Reland of: components/metrics: Add runtime memory leak detector
Reverted because it was failing some buildbots. The fixes have
been squashed into this one but they can be seen here as separate
patches.
http://crrev.com/1468873002
http://crrev.com/1471623003
==== Original commit message ====
This patch adds heuristic-based memory leak detector. Unlike
traditional leak detectors like valgrind, it doesn't wait until
a process terminates to check for leftover allocations. Instead,
it analyzes allocation patterns over time.
This code is not thread-safe. It is up to the caller of this code
to ensure thread safety.
BUG=382705
Signed-off-by: Simon Que <sque@chromium.org>
Review URL: https://codereview.chromium.org/1472763003
Cr-Commit-Position: refs/heads/master@{#363836}
Diffstat (limited to 'components/metrics.gypi')
-rw-r--r-- | components/metrics.gypi | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/components/metrics.gypi b/components/metrics.gypi index ef38c37..e889923 100644 --- a/components/metrics.gypi +++ b/components/metrics.gypi @@ -240,6 +240,34 @@ }, ], }], + ['chromeos==1', { + 'targets': [ + { + # GN version: //components/metrics:leak_detector + 'target_name': 'metrics_leak_detector', + 'type': 'static_library', + 'dependencies': [ + '../base/base.gyp:base', + ], + 'sources': [ + 'metrics/leak_detector/call_stack_manager.cc', + 'metrics/leak_detector/call_stack_manager.h', + 'metrics/leak_detector/call_stack_table.cc', + 'metrics/leak_detector/call_stack_table.h', + 'metrics/leak_detector/custom_allocator.cc', + 'metrics/leak_detector/custom_allocator.h', + 'metrics/leak_detector/leak_analyzer.cc', + 'metrics/leak_detector/leak_analyzer.h', + 'metrics/leak_detector/leak_detector_impl.cc', + 'metrics/leak_detector/leak_detector_impl.h', + 'metrics/leak_detector/leak_detector_value_type.cc', + 'metrics/leak_detector/leak_detector_value_type.h', + 'metrics/leak_detector/ranked_list.cc', + 'metrics/leak_detector/ranked_list.h', + ], + }, + ], + }], ['OS!="ios"', { 'targets': [ { |