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

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
« no previous file with comments | « runtime/vm/locations.cc ('k') | runtime/vm/os_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 4502610e06154fbb0d006e1f60fa0c7a960351f3..481cbed375b594c007376089a8d25e6c8ce05682 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1100,9 +1100,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
@@ -1819,7 +1821,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;
@@ -10563,7 +10565,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();
@@ -10625,7 +10627,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) {
@@ -12624,6 +12626,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) {
« no previous file with comments | « 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