Index: runtime/vm/runtime_entry.h |
diff --git a/runtime/vm/runtime_entry.h b/runtime/vm/runtime_entry.h |
index d3f8428a39f29bd2b2ddb32568933f82841f22cf..c52b6b55b05965e23c61c31a5da583c8deee9037 100644 |
--- a/runtime/vm/runtime_entry.h |
+++ b/runtime/vm/runtime_entry.h |
@@ -76,6 +76,15 @@ class RuntimeEntry : public ValueObject { |
DISALLOW_COPY_AND_ASSIGN(RuntimeEntry); |
}; |
+#ifndef PRODUCT |
+#define TRACE_RUNTIME_CALL(format, name) \ |
+ if (FLAG_trace_runtime_calls) { \ |
+ OS::Print("Runtime call: " format "\n", name); \ |
+ } |
+#else |
+#define TRACE_RUNTIME_CALL(format, name) \ |
+ do { } while (0) |
+#endif |
// Helper macros for declaring and defining runtime entries. |
@@ -91,7 +100,7 @@ class RuntimeEntry : public ValueObject { |
CHECK_STACK_ALIGNMENT; \ |
VERIFY_ON_TRANSITION; \ |
ASSERT(arguments.ArgCount() == argument_count); \ |
- if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \ |
+ TRACE_RUNTIME_CALL("%s", ""#name); \ |
{ \ |
Thread* thread = arguments.thread(); \ |
ASSERT(thread == Thread::Current()); \ |