summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authordmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-22 04:37:28 +0000
committerdmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-22 04:37:28 +0000
commit0bca7360f40463ed87026d7b85cd2eafe5793d22 (patch)
treec82c577174bb7d338f1ad43143fd24e1a271ffc3 /third_party
parent9ac01d0a82350aa994c169f1a61a57d474a73227 (diff)
downloadchromium_src-0bca7360f40463ed87026d7b85cd2eafe5793d22.zip
chromium_src-0bca7360f40463ed87026d7b85cd2eafe5793d22.tar.gz
chromium_src-0bca7360f40463ed87026d7b85cd2eafe5793d22.tar.bz2
Dump a bucket id for each mmap call in deep-heap-profile.
BUG=174304 Review URL: https://chromiumcodereview.appspot.com/12337002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/tcmalloc/chromium/src/deep-heap-profile.cc5
-rw-r--r--third_party/tcmalloc/chromium/src/deep-heap-profile.h13
2 files changed, 12 insertions, 6 deletions
diff --git a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
index 38e5633..8027073 100644
--- a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
+++ b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
@@ -741,6 +741,9 @@ void DeepHeapProfile::GlobalStats::SnapshotProcMaps(
mmap_dump_buffer->AppendString(continued ? ")" : " ", 0);
mmap_dump_buffer->AppendString(" hooked ", 0);
mmap_dump_buffer->AppendString(kMapsRegionTypeDict[type], 0);
+ mmap_dump_buffer->AppendString(" @ ", 0);
+ mmap_dump_buffer->AppendInt(
+ mmap_list[mmap_list_index].deep_bucket->id, 0);
mmap_dump_buffer->AppendString("\n", 0);
}
} while (mmap_list_index < mmap_list_length &&
@@ -862,6 +865,8 @@ void DeepHeapProfile::GlobalStats::RecordMMap(const void* pointer,
deep_profile->mmap_list_[deep_profile->mmap_list_length_].last_address =
address - 1 + alloc_value->bytes;
deep_profile->mmap_list_[deep_profile->mmap_list_length_].type = ABSENT;
+ deep_profile->mmap_list_[deep_profile->mmap_list_length_].deep_bucket =
+ deep_bucket;
++deep_profile->mmap_list_length_;
} else {
RAW_LOG(0, "Unexpected number of mmap entries: %d/%d",
diff --git a/third_party/tcmalloc/chromium/src/deep-heap-profile.h b/third_party/tcmalloc/chromium/src/deep-heap-profile.h
index 3f0ac89..d68fa1c 100644
--- a/third_party/tcmalloc/chromium/src/deep-heap-profile.h
+++ b/third_party/tcmalloc/chromium/src/deep-heap-profile.h
@@ -150,12 +150,6 @@ class DeepHeapProfile {
DISALLOW_COPY_AND_ASSIGN(TextBuffer);
};
- struct MMapListEntry {
- uint64 first_address;
- uint64 last_address;
- MapsRegionType type;
- };
-
// Contains extended information for HeapProfileTable::Bucket. These objects
// are managed in a hash table (DeepBucketTable) whose key is an address of
// a Bucket and other additional information.
@@ -217,6 +211,13 @@ class DeepHeapProfile {
int bucket_id_;
};
+ struct MMapListEntry {
+ uint64 first_address;
+ uint64 last_address;
+ MapsRegionType type;
+ DeepBucket* deep_bucket;
+ };
+
class RegionStats {
public:
RegionStats(): virtual_bytes_(0), committed_bytes_(0) {}