Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: third_party/tcmalloc/chromium/src/heap-profiler.cc

Issue 8635003: Fix HEAP_PROFILE_MMAP in google-perftools. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/heap-profiler.cc
diff --git a/third_party/tcmalloc/chromium/src/heap-profiler.cc b/third_party/tcmalloc/chromium/src/heap-profiler.cc
index 6b1ae524ebc3ce69f92cdb0b03cc9e493ac471f4..6e7172283874b5e1d0cf065256f625231518105a 100644
--- a/third_party/tcmalloc/chromium/src/heap-profiler.cc
+++ b/third_party/tcmalloc/chromium/src/heap-profiler.cc
@@ -190,6 +190,7 @@ static void AddRemoveMMapDataLocked(AddOrRemove mode) {
// MemoryRegionMap maintained all the data we need for all
// mmap-like allocations, so we just use it here:
MemoryRegionMap::LockHolder l;
+ heap_profile->MMapRecordBegin();
for (MemoryRegionMap::RegionIterator r = MemoryRegionMap::BeginRegionLocked();
r != MemoryRegionMap::EndRegionLocked(); ++r) {
if (mode == ADD) {
@@ -201,6 +202,7 @@ static void AddRemoveMMapDataLocked(AddOrRemove mode) {
heap_profile->RecordFree(reinterpret_cast<void*>(r->start_addr));
}
}
+ heap_profile->MMapRecordEnd();
}
// Input must be a buffer of size at least 1MB.
« no previous file with comments | « third_party/tcmalloc/chromium/src/heap-profile-table.cc ('k') | third_party/tcmalloc/chromium/src/malloc_hook.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698