diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-25 11:06:16 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-25 11:06:16 +0000 |
commit | 09c0077246c9be4122ca1fcbf892865a61ec12a8 (patch) | |
tree | b950452f435eb2bc38fe3659fb3502f02d7bfb58 /third_party/tcmalloc/chromium/src/heap-profile-table.cc | |
parent | 19c21ab2c25128adf65c39e11685993e4eea5bc7 (diff) | |
download | chromium_src-09c0077246c9be4122ca1fcbf892865a61ec12a8.zip chromium_src-09c0077246c9be4122ca1fcbf892865a61ec12a8.tar.gz chromium_src-09c0077246c9be4122ca1fcbf892865a61ec12a8.tar.bz2 |
Backported the HEAP_CHECK_MAX_LEAKS feature from the upstream perftools.
This should allow the heapcheck bot to print all the leaks found.
Review URL: http://codereview.chromium.org/522012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/tcmalloc/chromium/src/heap-profile-table.cc')
-rw-r--r-- | third_party/tcmalloc/chromium/src/heap-profile-table.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/third_party/tcmalloc/chromium/src/heap-profile-table.cc b/third_party/tcmalloc/chromium/src/heap-profile-table.cc index ce65c47..0369d90 100644 --- a/third_party/tcmalloc/chromium/src/heap-profile-table.cc +++ b/third_party/tcmalloc/chromium/src/heap-profile-table.cc @@ -82,6 +82,10 @@ DEFINE_bool(cleanup_old_heap_profiles, EnvToBool("HEAP_PROFILE_CLEANUP", true), "At initialization time, delete old heap profiles."); +DEFINE_int32(heap_check_max_leaks, + EnvToInt("HEAP_CHECK_MAX_LEAKS", 20), + "The maximum number of leak reports to print."); + //---------------------------------------------------------------------- // header of the dumped heap profile @@ -539,7 +543,9 @@ void HeapProfileTable::Snapshot::ReportLeaks(const char* checker_name, // Report a bounded number of leaks to keep the leak report from // growing too long. - const int to_report = (n > 20) ? 20 : n; + const int to_report = + (FLAGS_heap_check_max_leaks > 0 && + n > FLAGS_heap_check_max_leaks) ? FLAGS_heap_check_max_leaks : n; RAW_LOG(ERROR, "The %d largest leaks:", to_report); // Print |