Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 79a91cfc00407fe84b0650c916f7a0f9751316a2..39f00d3b437874a528176f1f4cfcbc8db87b6367 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -3273,6 +3273,24 @@ bool Heap::ConfigureHeapDefault() { |
} |
+void Heap::RecordStats(HeapStats* stats) { |
+ stats->new_space_size = new_space_.Size(); |
+ stats->new_space_capacity = new_space_.Capacity(); |
+ stats->old_pointer_space_size = old_pointer_space_->Size(); |
+ stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); |
+ stats->old_data_space_size = old_data_space_->Size(); |
+ stats->old_data_space_capacity = old_data_space_->Capacity(); |
+ stats->code_space_size = code_space_->Size(); |
+ stats->code_space_capacity = code_space_->Capacity(); |
+ stats->map_space_size = map_space_->Size(); |
+ stats->map_space_capacity = map_space_->Capacity(); |
+ stats->cell_space_size = cell_space_->Size(); |
+ stats->cell_space_capacity = cell_space_->Capacity(); |
+ stats->lo_space_size = lo_space_->Size(); |
+ GlobalHandles::RecordStats(stats); |
+} |
+ |
+ |
int Heap::PromotedSpaceSize() { |
return old_pointer_space_->Size() |
+ old_data_space_->Size() |