瀏覽代碼

Move data size probe to common place, where data is fetched, actually :)

Samuel Thibault 12 年之前
父節點
當前提交
f86c7da2f6
共有 2 個文件被更改,包括 11 次插入11 次删除
  1. 11 0
      src/datawizard/coherency.c
  2. 0 11
      src/sched_policies/deque_modeling_policy_data_aware.c

+ 11 - 0
src/datawizard/coherency.c

@@ -681,6 +681,10 @@ int _starpu_fetch_task_input(struct _starpu_job *j, uint32_t mask)
 
 	int workerid = starpu_worker_get_id();
 
+#ifdef STARPU_USE_FXT
+	unsigned total_size = 0;
+#endif
+
 	unsigned index;
 	for (index = 0; index < nbuffers; index++)
 	{
@@ -701,8 +705,15 @@ int _starpu_fetch_task_input(struct _starpu_job *j, uint32_t mask)
 		ret = fetch_data(handle, local_replicate, mode);
 		if (STARPU_UNLIKELY(ret))
 			goto enomem;
+
+#ifdef STARPU_USE_FXT
+		total_size += _starpu_data_get_size(handle);
+#endif
 	}
 
+#ifdef STARPU_USE_FXT
+	FUT_DO_PROBE2(_STARPU_FUT_DATA_LOAD, best_workerid, total_size);
+#endif
 	/* Now that we have taken the data locks in locking order, fill the codelet interfaces in function order.  */
 	for (index = 0; index < nbuffers; index++)
 	{

+ 0 - 11
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -346,17 +346,6 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 		starpu_prefetch_task_input_on_node(task, memory_node);
 	}
 
-	unsigned i;
-
-#ifdef STARPU_USE_FXT
-	unsigned total_size = 0;
-	for (i = 0; i < task->cl->nbuffers; i++)
-	{
-		total_size += _starpu_data_get_size(task->handles[i]);
-	}
-	FUT_DO_PROBE2(_STARPU_FUT_DATA_LOAD, best_workerid, total_size);
-#endif
-
 #ifdef HAVE_AYUDAME_H
 	if (AYU_event)
 	{