Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index 80cc885a80c95857498ced94d1ceeba38b20d5cf..8bc55e80315e172de9d65db28e2751d744c883ef 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -189,6 +189,7 @@ namespace internal { |
// Forward declaration of the GCTracer class. |
class GCTracer; |
+class HeapStats; |
// The all static Heap captures the interface to the global object heap. |
@@ -865,6 +866,8 @@ class Heap : public AllStatic { |
static RootListIndex RootIndexForExternalArrayType( |
ExternalArrayType array_type); |
+ static void RecordStats(HeapStats* stats); |
+ |
private: |
static int reserved_semispace_size_; |
static int max_semispace_size_; |
@@ -1100,6 +1103,28 @@ class Heap : public AllStatic { |
}; |
+struct HeapStats { |
+ int new_space_size; |
+ int new_space_capacity; |
+ int old_pointer_space_size; |
+ int old_pointer_space_capacity; |
+ int old_data_space_size; |
+ int old_data_space_capacity; |
+ int code_space_size; |
+ int code_space_capacity; |
+ int map_space_size; |
+ int map_space_capacity; |
+ int cell_space_size; |
+ int cell_space_capacity; |
+ int lo_space_size; |
+ int global_handle_count; |
+ int weak_global_handle_count; |
+ int pending_global_handle_count; |
+ int near_death_global_handle_count; |
+ int destroyed_global_handle_count; |
+}; |
+ |
+ |
class AlwaysAllocateScope { |
public: |
AlwaysAllocateScope() { |