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

Unified Diff: runtime/vm/object.cc

Issue 1678203002: Remove more feature in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 451dc3c0c22028766d101b96be346df65cf234fb..ec92845efa0660fd14e510cdfb49b6e388ecac92 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1099,9 +1099,11 @@ RawError* Object::Init(Isolate* isolate) {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
ASSERT(isolate == thread->isolate());
+#ifndef PRODUCT
TimelineDurationScope tds(thread,
isolate->GetIsolateStream(),
"Object::Init");
+#endif
#if defined(DART_NO_SNAPSHOT)
// Object::Init version when we are running in a version of dart that does
@@ -1818,7 +1820,7 @@ RawObject* Object::Allocate(intptr_t cls_id,
class_table->UpdateAllocatedOld(cls_id, size);
}
const Class& cls = Class::Handle(class_table->At(cls_id));
- if (cls.TraceAllocation(isolate)) {
+ if (FLAG_profiler && cls.TraceAllocation(isolate)) {
Profiler::SampleAllocation(thread, cls_id);
}
NoSafepointScope no_safepoint;
@@ -10561,7 +10563,7 @@ RawFunction* Library::GetFunction(const GrowableArray<Library*>& libs,
}
-#if defined(DART_NO_SNAPSHOT)
+#if defined(DART_NO_SNAPSHOT) && !defined(PRODUCT)
void Library::CheckFunctionFingerprints() {
GrowableArray<Library*> all_libs;
Function& func = Function::Handle();
@@ -10623,7 +10625,7 @@ Class& cls = Class::Handle();
FATAL("Fingerprint mismatch.");
}
}
-#endif // defined(DART_NO_SNAPSHOT).
+#endif // defined(DART_NO_SNAPSHOT) && !defined(PRODUCT).
RawInstructions* Instructions::New(intptr_t size) {
@@ -12622,6 +12624,9 @@ void Code::SetStubCallTargetCodeAt(uword pc, const Code& code) const {
void Code::Disassemble(DisassemblyFormatter* formatter) const {
+ if (!FLAG_support_disassembler) {
+ return;
+ }
const Instructions& instr = Instructions::Handle(instructions());
uword start = instr.EntryPoint();
if (formatter == NULL) {
« runtime/vm/il_printer.cc ('K') | « runtime/vm/locations.cc ('k') | runtime/vm/os_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698