diff options
author | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-16 07:02:28 +0000 |
---|---|---|
committer | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-16 07:02:28 +0000 |
commit | 27816a59eecb8d185d4139bd55ee167f8cdc6ec6 (patch) | |
tree | 979522c5851891e59f12f913423c92c46f03b52e /third_party | |
parent | bfbb87188dd4a850f8e51dd57d98b62473e0bc72 (diff) | |
download | chromium_src-27816a59eecb8d185d4139bd55ee167f8cdc6ec6.zip chromium_src-27816a59eecb8d185d4139bd55ee167f8cdc6ec6.tar.gz chromium_src-27816a59eecb8d185d4139bd55ee167f8cdc6ec6.tar.bz2 |
Change the heap file names to be Cleanup'ed in third_party/tcmalloc/chromium.
In spite of Chromium's changing heap file names dumped in heap-profiler.cc:DumpProfileLocked(), the file names cleaned-up in heap-profile-table.cc:HeapProfileTable::CleanupOldProfiles are not modified.
(See the difference between third_party/tcmalloc/chromium/src/heap-profiler.cc and .../vendor/src/heap-profiler.cc)
This patch is originally from http://codereview.chromium.org/7865021/.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8957007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/tcmalloc/chromium/src/heap-profile-table.cc | 5 |
1 files changed, 4 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 6d75c4a..a1da388 100644 --- a/third_party/tcmalloc/chromium/src/heap-profile-table.cc +++ b/third_party/tcmalloc/chromium/src/heap-profile-table.cc @@ -431,7 +431,10 @@ bool HeapProfileTable::WriteProfile(const char* file_name, void HeapProfileTable::CleanupOldProfiles(const char* prefix) { if (!FLAGS_cleanup_old_heap_profiles) return; - string pattern = string(prefix) + ".*" + kFileExt; + char buf[1000]; + snprintf(buf, 1000,"%s.%05d.", prefix, getpid()); + string pattern = string(buf) + ".*" + kFileExt; + #if defined(HAVE_GLOB_H) glob_t g; const int r = glob(pattern.c_str(), GLOB_ERR, NULL, &g); |