diff options
author | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 02:05:41 +0000 |
---|---|---|
committer | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 02:05:41 +0000 |
commit | 76b59047e7cc48aeb62ba2fb0ab52aab7e5dbfd6 (patch) | |
tree | a74986f03e50323203191a396737b070ca7d5045 | |
parent | eace182ed5944d76e5c4b344c8189cc15e2aab06 (diff) | |
download | chromium_src-76b59047e7cc48aeb62ba2fb0ab52aab7e5dbfd6.zip chromium_src-76b59047e7cc48aeb62ba2fb0ab52aab7e5dbfd6.tar.gz chromium_src-76b59047e7cc48aeb62ba2fb0ab52aab7e5dbfd6.tar.bz2 |
Revert 190835 - Fix MMAP_LIST in dumps by deep-heap-profile.
bucket_id in MMAP_LIST was wrong (only 0).
This change fixes the issue by changing the scope and the oparation order.
BUG=181517
TBR=glider@chromium.org
Review URL: https://codereview.chromium.org/12681013
TBR=dmikurube@chromium.org
Review URL: https://codereview.chromium.org/13259003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191262 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | third_party/tcmalloc/chromium/src/deep-heap-profile.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc index 35e8846..9037d3c 100644 --- a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc +++ b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc @@ -664,20 +664,15 @@ void DeepHeapProfile::GlobalStats::SnapshotMaps( bool first = true; do { - if (!first) { - cursor = mmap_iter->end_addr; - ++mmap_iter; - // Don't break here even if mmap_iter == EndRegionLocked(). - } - first = false; - + Bucket* bucket = NULL; DeepBucket* deep_bucket = NULL; - if (mmap_iter != MemoryRegionMap::EndRegionLocked()) { + if (!first) { 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, @@ -692,7 +687,12 @@ 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. |