Quellcode durchsuchen

update TSAN suppressions

Samuel Thibault vor 10 Jahren
Ursprung
Commit
db8e8261a4

+ 1 - 1
src/common/utils.h

@@ -85,7 +85,7 @@
 #define _STARPU_UYIELD() ((void)0)
 #endif
 #if defined(STARPU_HAVE_SCHED_YIELD) && defined(STARPU_HAVE_HELGRIND_H)
-#define STARPU_UYIELD() do { if (RUNNING_ON_VALGRIND) sched_yield(); else _STARPU_UYIELD(); } while (0)
+#define STARPU_UYIELD() do { if (STARPU_RUNNING_ON_VALGRIND) sched_yield(); else _STARPU_UYIELD(); } while (0)
 #else
 #define STARPU_UYIELD() _STARPU_UYIELD()
 #endif

+ 2 - 4
src/core/dependencies/implicit_data_deps.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2014  Université de Bordeaux
+ * Copyright (C) 2010-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2013, 2015  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -493,9 +493,7 @@ void _starpu_unlock_post_sync_tasks(starpu_data_handle_t handle)
 	/* Here helgrind would shout that this is an unprotected access, but
 	 * count can only be zero if we don't have to care about
 	 * post_sync_tasks_cnt at all.  */
-	unsigned count = handle->post_sync_tasks_cnt;
-
-	if (count)
+	if (STARPU_RUNNING_ON_VALGRIND || handle->post_sync_tasks_cnt)
 	{
 		STARPU_PTHREAD_MUTEX_LOCK(&handle->sequential_consistency_mutex);
 		if (--handle->post_sync_tasks_cnt == 0)

+ 1 - 1
src/datawizard/memalloc.c

@@ -1009,7 +1009,7 @@ void starpu_memchunk_tidy(unsigned node)
 	target = (total * target_p) / 100;
 	amount = target - available;
 
-	if (tidying[node])
+	if (!STARPU_RUNNING_ON_VALGRIND && tidying[node])
 		/* Some thread is already tidying this node, let it do it */
 		return;
 

+ 2 - 2
src/sched_policies/eager_central_priority_policy.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2014  Université de Bordeaux
+ * Copyright (C) 2010-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2015  CNRS
  * Copyright (C) 2011  INRIA
  *
@@ -199,7 +199,7 @@ static struct starpu_task *_starpu_priority_pop_task(unsigned sched_ctx_id)
 	/* Here helgrind would shout that this is unprotected, this is just an
 	 * integer access, and we hold the sched mutex, so we can not miss any
 	 * wake up. */
-	if (taskq->total_ntasks == 0)
+	if (!STARPU_RUNNING_ON_VALGRIND && taskq->total_ntasks == 0)
 		return NULL;
 
 #ifdef STARPU_NON_BLOCKING_DRIVERS

+ 2 - 2
tests/helper.h

@@ -45,7 +45,7 @@ static int _starpu_valgrind_print_once STARPU_ATTRIBUTE_UNUSED = 0;
 #  define STARPU_SKIP_IF_VALGRIND \
 	do \
 	{								\
-		if(RUNNING_ON_VALGRIND)					\
+		if(STARPU_RUNNING_ON_VALGRIND)					\
 		{							\
 			if (!_starpu_valgrind_print_once)		\
 			{						\
@@ -59,7 +59,7 @@ static int _starpu_valgrind_print_once STARPU_ATTRIBUTE_UNUSED = 0;
 #  define STARPU_RETURN(ret) \
 	do								\
 	{								\
-		if(RUNNING_ON_VALGRIND)					\
+		if(STARPU_RUNNING_ON_VALGRIND)					\
 		{							\
 			FPRINTF(stderr, "Running on valgrind, ignoring return value\n"); \
 			return 0;					\

+ 13 - 2
tools/tsan/starpu.suppr

@@ -9,9 +9,9 @@ race:^fun:starpu_task_nready$
 # The config.running/pause_depth state is only protected by memory barriers
 race:^_starpu_machine_is_running$
 race:^_starpu_kill_all_workers$
-race:^_starpu_pause$
+race:^starpu_pause$
 race:^_starpu_may_pause$
-race:^_starpu_resume$
+race:^starpu_resume$
 
 # The integer access is atomic, and we use the sched mutex to avoid missing wake ups
 race:^_starpu_fifo_empty$
@@ -22,3 +22,14 @@ race:^starpu_memory_get_available$
 race:^mc_cache_size$
 race:^mc_nb$
 race:^mc_clean_nb$
+race:^alloc_cnt$
+race:^data_requests_npending$
+race:^_starpu_profiling$
+race:^_starpu_history_based_job_expected_perf$
+race:^compute_ntasks_end$
+race:^compute_expected_end$
+race:^compute_all_performance_predictions$
+
+# ignore other libraries' races
+race:^libmpi.so$
+race:^libhwloc*.so$