Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: runtime/vm/dart.cc

Issue 1715123003: - Add DEBUG_ONLY and NOT_IN_PRODUCT macros. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status files. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698