ソースを参照

Fix the profiling mode: perhaps the executing time was not updated

Cédric Augonnet 14 年 前
コミット
37ee43789b
共有2 個のファイルを変更した4 個の追加2 個の削除を含む
  1. 2 1
      src/drivers/driver_common/driver_common.c
  2. 2 1
      src/profiling/profiling.c

+ 2 - 1
src/drivers/driver_common/driver_common.c

@@ -61,8 +61,9 @@ void _starpu_driver_update_job_feedback(starpu_job_t j, struct starpu_worker_s *
 		if (calibrate_model)
 			_starpu_update_perfmodel_history(j, j->task->cl->model,  perf_arch, worker_args->devid, measured);
 	}
+
 	if (!updated)
-		_starpu_worker_update_profiling_info_executing(workerid, 0, 1, 0, 0, 0);
+		_starpu_worker_update_profiling_info_executing(workerid, NULL, 1, 0, 0, 0);
 
 	if (profiling_info && profiling_info->power_consumed && cl->power_model && cl->power_model->benchmarking) {
 		_starpu_update_perfmodel_history(j, j->task->cl->power_model,  perf_arch, worker_args->devid, profiling_info->power_consumed);

+ 2 - 1
src/profiling/profiling.c

@@ -236,7 +236,8 @@ void _starpu_worker_update_profiling_info_executing(int workerid, struct timespe
 	{
 		PTHREAD_MUTEX_LOCK(&worker_info_mutex[workerid]);
 
-		starpu_timespec_accumulate(&worker_info[workerid].executing_time, executing_time);
+		if (executing_time)
+			starpu_timespec_accumulate(&worker_info[workerid].executing_time, executing_time);
 
 		worker_info[workerid].used_cycles += used_cycles;
 		worker_info[workerid].stall_cycles += stall_cycles;