Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] a source file to keep functions to deal with data structures for paje tracing
[simgrid.git] / src / instr / instr_msg_task.c
index 59ca7c0..73018af 100644 (file)
@@ -54,7 +54,7 @@ void TRACE_msg_set_task_category(m_task_t task, const char *category)
     msg = newContainer(task->name, INSTR_MSG_TASK, host_container);
     type_t type = getType (task->category);
     if (!type){
-      type = newVariableType(task->category, TYPE_VARIABLE, NULL, msg->type);
+      type = getVariableType(task->category, NULL, msg->type);
     }
     pajeSetVariable(SIMIX_get_clock(), type->id, msg->id, "1");
 
@@ -153,7 +153,10 @@ void TRACE_msg_task_get_end(double start_time, m_task_t task)
   type = getType ("MSG_TASK_STATE");
   pajePushState (MSG_get_clock(), type->id, msg->id, "created");
 
-  //FIXME: pajeEndLink
+  type = getType ("MSG_TASK_LINK");
+  char key[INSTR_DEFAULT_STR_SIZE];
+  snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", task->counter);
+  pajeEndLink(MSG_get_clock(), type->id, "0", "SR", msg->id, key);
 }
 
 /* MSG_task_put related functions */
@@ -169,7 +172,10 @@ int TRACE_msg_task_put_start(m_task_t task)
   type_t type = getType ("MSG_TASK_STATE");
   pajePopState (MSG_get_clock(), type->id, msg->id);
 
-  //FIXME: pajeStartLink
+  type = getType ("MSG_TASK_LINK");
+  char key[INSTR_DEFAULT_STR_SIZE];
+  snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", task->counter);
+  pajeStartLink(MSG_get_clock(), type->id, "0", "SR", msg->id, key);
 
   destroyContainer (msg);