浏览代码

delete TSD only after fxt is really off

Samuel Thibault 10 年之前
父节点
当前提交
df782f4617
共有 1 个文件被更改,包括 2 次插入1 次删除
  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;
 	}