Index: src/heap/heap-inl.h |
diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h |
index fc487d0cb70444f0de247121382644841a132828..4932b4483b2226cbd4ad77a7e19308b8b2e9dbb6 100644 |
--- a/src/heap/heap-inl.h |
+++ b/src/heap/heap-inl.h |
@@ -12,6 +12,7 @@ |
#include "src/heap/heap.h" |
#include "src/heap/incremental-marking-inl.h" |
#include "src/heap/mark-compact.h" |
+#include "src/heap/object-stats.h" |
#include "src/heap/remembered-set.h" |
#include "src/heap/spaces-inl.h" |
#include "src/heap/store-buffer.h" |
@@ -809,6 +810,16 @@ void Heap::SetSerializedTemplates(FixedArray* templates) { |
set_serialized_templates(templates); |
} |
+void Heap::CreateObjectStats() { |
+ if (V8_LIKELY(FLAG_gc_stats == 0)) return; |
+ if (!live_object_stats_) { |
+ live_object_stats_ = new ObjectStats(this); |
+ } |
+ if (!dead_object_stats_) { |
+ dead_object_stats_ = new ObjectStats(this); |
+ } |
+} |
+ |
AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) |
: heap_(isolate->heap()) { |
heap_->always_allocate_scope_count_.Increment(1); |