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

Unified Diff: src/heap-profiler.cc

Issue 306001: Heap profiler: skip byte arrays that represent free list blocks when counting allocated objects. (Closed)
Patch Set: added the third type to check Created 11 years, 2 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 | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.cc
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index 8f55ce1ce49356b581a6d56731e37e91638e191d..f80c9a07bf97182386dd921e99b2c14cf521e73f 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -576,8 +576,10 @@ void RetainerHeapProfile::PrintStats() {
void HeapProfiler::CollectStats(HeapObject* obj, HistogramInfo* info) {
InstanceType type = obj->map()->instance_type();
ASSERT(0 <= type && type <= LAST_TYPE);
- info[type].increment_number(1);
- info[type].increment_bytes(obj->Size());
+ if (!FreeListNode::IsFreeListNode(obj)) {
+ info[type].increment_number(1);
+ info[type].increment_bytes(obj->Size());
+ }
}
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698