- char processid[100];
- snprintf (processid, 100, "%p", SIMIX_process_self());
- xbt_dict_remove (current_task_category, processid);
+ char container[200];
+ char name[200], alias[200];
+ char *val_one = NULL;
+ m_process_t process = NULL;
+ m_host_t host = NULL;
+ if (!IS_TRACING_TASKS)
+ return;
+ process = MSG_process_self();
+ host = MSG_process_get_host(process);
+
+ //tasks are grouped by host
+ TRACE_host_container(host, container, 200);
+ TRACE_task_container(task, name, 200);
+ TRACE_task_alias_container(task, process, host, alias, 200);
+ //check if task container is already created
+ if (!xbt_dict_get_or_null(task_containers, alias)) {
+ pajeCreateContainer(MSG_get_clock(), alias, "TASK", container, name);
+ pajeSetState(MSG_get_clock(), "category", alias, task->category);
+ val_one = xbt_strdup("1");
+ xbt_dict_set(task_containers, alias, val_one, xbt_free);
+ }