about summary refs log tree commit diff stats
path: root/036refcount.cc
diff options
context:
space:
mode:
Diffstat (limited to '036refcount.cc')
-rw-r--r--036refcount.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/036refcount.cc b/036refcount.cc
index ab5618aa..e04261bd 100644
--- a/036refcount.cc
+++ b/036refcount.cc
@@ -1051,9 +1051,11 @@ if (Run_profiler) {
   initial_num_refcount_updates = Total_refcount_updates;
 }
 :(before "End Non-primitive Call(caller_frame)")
-Num_refcount_updates[caller_frame.running_recipe][caller_frame.running_step_index]
-    += (Total_refcount_updates - initial_num_refcount_updates);
-initial_num_refcount_updates = Total_refcount_updates;
+if (Run_profiler) {
+  Num_refcount_updates[caller_frame.running_recipe][caller_frame.running_step_index]
+      += (Total_refcount_updates - initial_num_refcount_updates);
+  initial_num_refcount_updates = Total_refcount_updates;
+}
 :(after "Begin Return")
 if (Run_profiler) {
   Num_refcount_updates[current_call().running_recipe][current_call().running_step_index]