Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 8019a4522b4bafb811263bc39bb53e516fbeb2b6..0884f9b8ca79d78f838e2bcded5f1aef1c17c936 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -4853,12 +4853,34 @@ typedef void (*InterruptCallback)(Isolate* isolate, void* data); |
| class V8_EXPORT HeapStatistics { |
| public: |
| HeapStatistics(); |
| + |
| + class SpaceStatistics { |
| + public: |
| + size_t size() { return size_of_objects_; } |
| + size_t committed_memory() { return committed_memory_; } |
| + size_t avalable() { return available_memory_; } |
| + |
| + private: |
| + size_t size_of_objects_; |
| + size_t committed_memory_; |
| + size_t available_memory_; |
| + |
| + friend class HeapStatisticsHelper; |
| + }; |
| + |
| size_t total_heap_size() { return total_heap_size_; } |
| size_t total_heap_size_executable() { return total_heap_size_executable_; } |
| size_t total_physical_size() { return total_physical_size_; } |
| size_t used_heap_size() { return used_heap_size_; } |
| size_t heap_size_limit() { return heap_size_limit_; } |
| + SpaceStatistics* new_space_statistics() { return &new_space_stats_; } |
| + SpaceStatistics* old_space_statistics() { return &old_space_stats_; } |
| + SpaceStatistics* code_space_statistics() { return &code_space_stats_; } |
| + SpaceStatistics* map_space_statistics() { return &map_space_stats_; } |
| + SpaceStatistics* cell_space_statistics() { return &cell_space_stats_; } |
| + SpaceStatistics* lo_space_statistics() { return &lo_space_stats_; } |
| + |
| private: |
| size_t total_heap_size_; |
| size_t total_heap_size_executable_; |
| @@ -4866,7 +4888,14 @@ class V8_EXPORT HeapStatistics { |
| size_t used_heap_size_; |
| size_t heap_size_limit_; |
| - friend class V8; |
| + SpaceStatistics new_space_stats_; |
| + SpaceStatistics old_space_stats_; |
| + SpaceStatistics code_space_stats_; |
| + SpaceStatistics map_space_stats_; |
| + SpaceStatistics cell_space_stats_; |
| + SpaceStatistics lo_space_stats_; |
|
rmcilroy
2015/04/13 12:48:23
Maybe we want to make this a bit more opaque to av
|
| + |
| + friend class HeapStatisticsHelper; |
| friend class Isolate; |
| }; |