| Index: runtime/vm/dart.cc
|
| diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
|
| index 5e563ebf3424c0ccfe39f4a1ec2cc969f0fe6c51..2ad8c07fc88d57a846c7154c259cf601b07a4f9b 100644
|
| --- a/runtime/vm/dart.cc
|
| +++ b/runtime/vm/dart.cc
|
| @@ -99,10 +99,8 @@ const char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
|
| if (FLAG_support_timeline) {
|
| Timeline::InitOnce();
|
| }
|
| -#ifndef PRODUCT
|
| - TimelineDurationScope tds(Timeline::GetVMStream(),
|
| - "Dart::InitOnce");
|
| -#endif
|
| + NOT_IN_PRODUCT(TimelineDurationScope tds(Timeline::GetVMStream(),
|
| + "Dart::InitOnce"));
|
| Isolate::InitOnce();
|
| PortMap::InitOnce();
|
| FreeListElement::InitOnce();
|
| @@ -393,18 +391,17 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
|
| // Initialize the new isolate.
|
| Thread* T = Thread::Current();
|
| Isolate* I = T->isolate();
|
| -#ifndef PRODUCT
|
| - TimelineDurationScope tds(T, I->GetIsolateStream(), "InitializeIsolate");
|
| - tds.SetNumArguments(1);
|
| - tds.CopyArgument(0, "isolateName", I->name());
|
| -#endif // !PRODUCT
|
| + NOT_IN_PRODUCT(
|
| + TimelineDurationScope tds(T, I->GetIsolateStream(), "InitializeIsolate");
|
| + tds.SetNumArguments(1);
|
| + tds.CopyArgument(0, "isolateName", I->name());
|
| + )
|
| ASSERT(I != NULL);
|
| StackZone zone(T);
|
| HandleScope handle_scope(T);
|
| {
|
| -#ifndef PRODUCT
|
| - TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init");
|
| -#endif // !PRODUCT
|
| + NOT_IN_PRODUCT(TimelineDurationScope tds(T,
|
| + I->GetIsolateStream(), "ObjectStore::Init"));
|
| ObjectStore::Init(I);
|
| }
|
|
|
| @@ -414,10 +411,8 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
|
| }
|
| if (snapshot_buffer != NULL) {
|
| // Read the snapshot and setup the initial state.
|
| -#ifndef PRODUCT
|
| - TimelineDurationScope tds(
|
| - T, I->GetIsolateStream(), "IsolateSnapshotReader");
|
| -#endif // !PRODUCT
|
| + NOT_IN_PRODUCT(TimelineDurationScope tds(T,
|
| + I->GetIsolateStream(), "IsolateSnapshotReader"));
|
| // TODO(turnidge): Remove once length is not part of the snapshot.
|
| const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer);
|
| if (snapshot == NULL) {
|
| @@ -451,14 +446,11 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
|
| }
|
|
|
| Object::VerifyBuiltinVtables();
|
| -#if defined(DEBUG)
|
| - I->heap()->Verify(kForbidMarked);
|
| -#endif
|
| + DEBUG_ONLY(I->heap()->Verify(kForbidMarked));
|
|
|
| {
|
| -#ifndef PRODUCT
|
| - TimelineDurationScope tds(T, I->GetIsolateStream(), "StubCode::Init");
|
| -#endif // !PRODUCT
|
| + NOT_IN_PRODUCT(TimelineDurationScope tds(T,
|
| + I->GetIsolateStream(), "StubCode::Init"));
|
| StubCode::Init(I);
|
| }
|
|
|
|
|