Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index c85afa2c21058d56586eadf69c79333f1ccf39b7..9e0284e71133ad8f72e467b87372f4ee92c1029c 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -31,7 +31,6 @@ |
#include "vm/parser.h" |
#include "vm/precompiler.h" |
#include "vm/profiler.h" |
-#include "vm/report.h" |
#include "vm/reusable_handles.h" |
#include "vm/runtime_entry.h" |
#include "vm/scopes.h" |
@@ -12821,11 +12820,13 @@ RawCode* Code::FinalizeCode(const char* name, |
CPU::FlushICache(instrs.EntryPoint(), instrs.size()); |
code.set_compile_timestamp(OS::GetCurrentMonotonicMicros()); |
+#ifndef PRODUCT |
CodeObservers::NotifyAll(name, |
instrs.EntryPoint(), |
assembler->prologue_offset(), |
instrs.size(), |
optimized); |
+#endif |
{ |
NoSafepointScope no_safepoint; |
const ZoneGrowableArray<intptr_t>& pointer_offsets = |
@@ -12882,13 +12883,14 @@ RawCode* Code::FinalizeCode(const Function& function, |
bool optimized) { |
// Calling ToLibNamePrefixedQualifiedCString is very expensive, |
// try to avoid it. |
+#ifndef PRODUCT |
if (CodeObservers::AreActive()) { |
return FinalizeCode(function.ToLibNamePrefixedQualifiedCString(), |
assembler, |
optimized); |
- } else { |
- return FinalizeCode("", assembler, optimized); |
} |
+#endif // !PRODUCT |
+ return FinalizeCode("", assembler, optimized); |
} |