Explorar o código

delete TSD only after fxt is really off

Samuel Thibault %!s(int64=11) %!d(string=hai) anos
pai
achega
df782f4617
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/common/fxt.c

+ 2 - 1
src/common/fxt.c

@@ -198,7 +198,6 @@ void _starpu_stop_fxt_profiling(void)
 		if (generate_trace == 1)
 			_starpu_generate_paje_trace(_STARPU_PROF_FILE_USER, "paje.trace");
 
-		starpu_pthread_key_delete(_starpu_tid);
 		int ret = fut_done();
 		if (ret < 0)
 		{
@@ -207,6 +206,8 @@ void _starpu_stop_fxt_profiling(void)
 			fprintf(stderr, "Warning: the FxT trace could not be generated properly\n");
 		}
 
+		starpu_pthread_key_delete(_starpu_tid);
+
 		_starpu_written = 1;
 		_starpu_fxt_started = 0;
 	}