Explorar el Código

Do not try to take sample lock if there is no listener anyway

Samuel Thibault hace 5 años
padre
commit
2fbf9def37
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/common/knobs.c

+ 3 - 0
src/common/knobs.c

@@ -462,6 +462,9 @@ void _starpu_perf_counter_register_updater(enum starpu_perf_counter_scope scope,
 
 static void update_sample(struct starpu_perf_counter_sample *sample, void *context)
 {
+	if (sample->listener == NULL)
+		return;
+
 	_starpu_spin_lock(&sample->lock);
 	struct perf_counter_array *counters = _get_counters(sample->scope);