| Index: runtime/vm/dart.cc
|
| diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
|
| index a26c0c4521a36d8c7f8b38ee51d4ac483bbd4cb9..4d64bd1ac7560bd1ace1bf902baaac8efd575163 100644
|
| --- a/runtime/vm/dart.cc
|
| +++ b/runtime/vm/dart.cc
|
| @@ -25,6 +25,7 @@ namespace dart {
|
|
|
| DEFINE_FLAG(bool, heap_profile_initialize, false,
|
| "Writes a heap profile on isolate initialization.");
|
| +DECLARE_FLAG(bool, heap_trace);
|
| DECLARE_FLAG(bool, print_bootstrap);
|
| DECLARE_FLAG(bool, print_class_table);
|
| DECLARE_FLAG(bool, trace_isolates);
|
| @@ -99,6 +100,9 @@ const char* Dart::InitOnce(Dart_IsolateCreateCallback create,
|
| Isolate::SetInterruptCallback(interrupt);
|
| Isolate::SetUnhandledExceptionCallback(unhandled);
|
| Isolate::SetShutdownCallback(shutdown);
|
| + if (FLAG_heap_trace) {
|
| + HeapTrace::InitOnce(file_open, file_write, file_close);
|
| + }
|
| return NULL;
|
| }
|
|
|
| @@ -181,6 +185,9 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
|
|
|
| StubCode::Init(isolate);
|
| isolate->megamorphic_cache_table()->InitMissHandler();
|
| + if (FLAG_heap_trace) {
|
| + isolate->heap()->trace()->Init(isolate);
|
| + }
|
| isolate->heap()->EnableGrowthControl();
|
| isolate->set_init_callback_data(data);
|
| if (FLAG_print_class_table) {
|
|
|