Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 28c84106df4c260cfbd2e96972a12efcd1f10964..5e56a5e0798c744c0b005e49d67dee982e10d564 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -6966,6 +6966,24 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) { |
| heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); |
| heap_statistics->used_heap_size_ = heap->SizeOfObjects(); |
| heap_statistics->heap_size_limit_ = heap->MaxReserved(); |
| + |
| + HeapStatistics::SpaceStatistics new_space_stats( |
| + heap->new_space()->Size(), heap->new_space()->CommittedMemory(), |
| + heap->new_space()->Available()); |
| + heap_statistics->spaces_statistics().push_back(new_space_stats); |
| + |
| + for (int space = i::AllocationSpace::FIRST_PAGED_SPACE; |
| + space < i::AllocationSpace::LAST_PAGED_SPACE; space++) { |
| + HeapStatistics::SpaceStatistics space_stats( |
| + heap->paged_space(space)->Size(), |
|
rmcilroy
2015/04/13 17:40:08
This should be SizeOfObjects()
ssid
2015/04/14 16:59:16
Done.
|
| + heap->paged_space(space)->CommittedMemory(), |
| + heap->paged_space(space)->Available()); |
| + heap_statistics->spaces_statistics().push_back(space_stats); |
| + } |
| + HeapStatistics::SpaceStatistics lo_space_stats( |
|
rmcilroy
2015/04/13 17:40:08
nit - newline above
ssid
2015/04/14 16:59:16
Done.
|
| + heap->lo_space()->Size(), heap->lo_space()->CommittedMemory(), |
| + heap->lo_space()->Available()); |
| + heap_statistics->spaces_statistics().push_back(lo_space_stats); |
| } |