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

Unified Diff: src/heap.cc

Issue 10792014: Track counts/sizes of CODE sub types with --track-gc-object-stats (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Turn flag off by default Created 8 years, 5 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
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 309d0adf02ae1310cf654b9b261ba7632f1f336f..f63d00fc231f7d4a212ba09c77951f803ec41e13 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -7223,6 +7223,18 @@ void Heap::CheckpointObjectStats() {
counters->size_of_##name()->Decrement(object_sizes_last_time_[name]);
INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
#undef ADJUST_LAST_TIME_OBJECT_COUNT
+#define ADJUST_LAST_TIME_OBJECT_COUNT(name) \
+ counters->count_of_CODE_TYPE_##name()->Increment( \
+ object_counts_[FIRST_CODE_KIND_SUB_TYPE + Code::name]); \
+ counters->count_of_CODE_TYPE_##name()->Decrement( \
+ object_counts_last_time_[FIRST_CODE_KIND_SUB_TYPE + Code::name]); \
+ counters->size_of_CODE_TYPE_##name()->Increment( \
+ object_sizes_[FIRST_CODE_KIND_SUB_TYPE + Code::name]); \
+ counters->size_of_CODE_TYPE_##name()->Decrement( \
+ object_sizes_last_time_[FIRST_CODE_KIND_SUB_TYPE + Code::name]);
+ CODE_KIND_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
+#undef ADJUST_LAST_TIME_OBJECT_COUNT
+
memcpy(object_counts_last_time_, object_counts_,
sizeof(object_counts_));
memcpy(object_sizes_last_time_, object_sizes_,

Powered by Google App Engine
This is Rietveld 408576698