Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 8019a4522b4bafb811263bc39bb53e516fbeb2b6..a44177807298679b5913eb3627ee661cec523fff 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -18,6 +18,7 @@ |
| #include <stddef.h> |
| #include <stdint.h> |
| #include <stdio.h> |
| +#include <vector> |
|
rmcilroy
2015/04/13 17:40:07
We probably don't want to pull in <vector> to be a
|
| #include "v8-version.h" |
| #include "v8config.h" |
| @@ -4853,11 +4854,27 @@ typedef void (*InterruptCallback)(Isolate* isolate, void* data); |
| class V8_EXPORT HeapStatistics { |
| public: |
| HeapStatistics(); |
| + |
| + class SpaceStatistics { |
| + public: |
| + SpaceStatistics(size_t size_of_objects, size_t committed_memory, |
|
rmcilroy
2015/04/13 17:40:07
Add a name field so we know what each space each S
rmcilroy
2015/04/13 17:40:08
nit - each arg on a newline
ssid
2015/04/14 16:59:16
Done.
|
| + size_t available_memory) |
| + : size_of_objects_(size_of_objects), |
| + committed_memory_(committed_memory), |
| + available_memory_(available_memory) {} |
| + size_t size_of_objects_; |
| + size_t committed_memory_; |
| + size_t available_memory_; |
|
rmcilroy
2015/04/13 17:40:07
I think we should make these more obvious names if
ssid
2015/04/14 16:59:16
Done.
|
| + }; |
| + |
| 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_; } |
| + std::vector<SpaceStatistics> spaces_statistics() { |
| + return spaces_statistics_; |
| + } |
| private: |
| size_t total_heap_size_; |
| @@ -4865,6 +4882,7 @@ class V8_EXPORT HeapStatistics { |
| size_t total_physical_size_; |
| size_t used_heap_size_; |
| size_t heap_size_limit_; |
| + std::vector<SpaceStatistics> spaces_statistics_; |
| friend class V8; |
| friend class Isolate; |