Przeglądaj źródła

print deps of running tasks

Samuel Thibault 13 lat temu
rodzic
commit
e183cd08d1
1 zmienionych plików z 26 dodań i 3 usunięć
  1. 26 3
      tools/gdbinit

+ 26 - 3
tools/gdbinit

@@ -24,8 +24,10 @@ define starpu-print-job
   printf "\tsubmitted:\t\t\t<%d>\n", $job->submitted
   printf "\tterminated:\t\t\t<%d>\n", $job->terminated
   printf "\tjob_id:\t\t\t\t<%d>\n", $job->job_id
-  if _starpu_use_fxt == 1 && $job->model_name
-    printf "\tmodel_name:\t\t\t<%s>\n", $job->model_name
+  if _starpu_use_fxt == 1
+    if $job->model_name
+      printf "\tmodel_name:\t\t\t<%s>\n", $job->model_name
+    end
   end
 end
 
@@ -134,7 +136,28 @@ define starpu-tasks
   while $n < config.topology.nworkers
     set $task = config.workers[$n].current_task
     if ($task)
-      printf "worker %d: %p\n", $n, $task
+      printf "worker %d:\n", $n
+      starpu-print-task $task
+      set $j = (struct _starpu_job *) $task->starpu_private
+      set $nsuccs = $j->job_successors.nsuccs
+      set $i = 0
+      while $i < $nsuccs
+        set $cg = $j->job_successors.succ[$i]
+	if ($cg->cg_type == 1)
+	  # STARPU_CG_APPS
+	  printf "waited for by application"
+	end
+	if ($cg->cg_type == 2)
+	  # STARPU_CG_TAG
+	  printf "will produce tag %x\n", $cg->succ.tag
+	end
+	if ($cg->cg_type == 4)
+	  # STARPU_CG_TASK
+	  printf "dep of task %p\n", $cg->succ.job
+	  starpu-print-task $cg->succ.job->task
+	end
+        set $i = $i + 1
+      end
     end
     set $n = $n + 1
   end