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

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

Issue 12681013: Fix MMAP_LIST in dumps by deep-heap-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/deep-heap-profile.cc
diff --git a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
index 9037d3c0edae165461054edaac94e79e7a9c54c4..35e88462e6a7d46f20d72e4a77acd6b8797f912c 100644
--- a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
+++ b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
@@ -664,15 +664,20 @@ void DeepHeapProfile::GlobalStats::SnapshotMaps(
bool first = true;
do {
- Bucket* bucket = NULL;
- DeepBucket* deep_bucket = NULL;
if (!first) {
+ cursor = mmap_iter->end_addr;
+ ++mmap_iter;
+ // Don't break here even if mmap_iter == EndRegionLocked().
+ }
+ first = false;
+
+ DeepBucket* deep_bucket = NULL;
+ if (mmap_iter != MemoryRegionMap::EndRegionLocked()) {
size_t committed = deep_profile->memory_residence_info_getter_->
CommittedSize(mmap_iter->start_addr, mmap_iter->end_addr - 1);
// TODO(dmikurube): Store a reference to the bucket in region.
Bucket* bucket = MemoryRegionMap::GetBucket(
mmap_iter->call_stack_depth, mmap_iter->call_stack);
- DeepBucket* deep_bucket = NULL;
if (bucket != NULL) {
deep_bucket = deep_profile->deep_table_.Lookup(
bucket,
@@ -687,12 +692,7 @@ void DeepHeapProfile::GlobalStats::SnapshotMaps(
profiled_mmap_.AddToVirtualBytes(
mmap_iter->end_addr - mmap_iter->start_addr);
profiled_mmap_.AddToCommittedBytes(committed);
-
- cursor = mmap_iter->end_addr;
- ++mmap_iter;
- // Don't break here even if mmap_iter == EndRegionLocked().
}
- first = false;
uint64 last_address_of_unhooked;
// If the next mmap entry is away from the current maps line.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698