Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index cecc08880845240fa35fe75df2ce7389b0f2a72b..efe0fc4f37f29975040269be3435967a4db94079 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -16,6 +16,7 @@ |
#include "vm/debugger.h" |
#include "vm/deopt_instructions.h" |
#include "vm/heap.h" |
+#include "vm/heap_class_stats.h" |
#include "vm/heap_histogram.h" |
#include "vm/message_handler.h" |
#include "vm/object_id_ring.h" |
@@ -44,6 +45,7 @@ DEFINE_FLAG(bool, trace_isolates, false, |
void Isolate::RegisterClass(const Class& cls) { |
class_table()->Register(cls); |
if (object_histogram() != NULL) object_histogram()->RegisterClass(cls); |
+ if (heap_class_stats() != NULL) heap_class_stats()->RegisterClass(cls); |
} |
@@ -307,11 +309,13 @@ Isolate::Isolate() |
stack_frame_index_(-1), |
object_histogram_(NULL), |
object_id_ring_(NULL), |
+ heap_class_stats_(NULL), |
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS) |
reusable_handles_() { |
if (FLAG_print_object_histogram && (Dart::vm_isolate() != NULL)) { |
object_histogram_ = new ObjectHistogram(this); |
} |
+ heap_class_stats_ = new HeapClassStatistics(this); |
} |
#undef REUSABLE_HANDLE_INITIALIZERS |
@@ -332,6 +336,7 @@ Isolate::~Isolate() { |
message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. |
ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. |
delete object_histogram_; |
+ delete heap_class_stats_; |
} |
void Isolate::SetCurrent(Isolate* current) { |