-static void TRACE_msg_process_location(m_process_t process)
-{
- char name[200], alias[200];
- m_host_t host = NULL;
- if (!(IS_TRACING_PROCESSES || IS_TRACING_VOLUME))
- return;
-
- host = MSG_process_get_host(process);
- TRACE_process_container(process, name, 200);
- TRACE_process_alias_container(process, host, alias, 200);
-
- //check if process_alias container is already created
- if (!xbt_dict_get_or_null(process_containers, alias)) {
- pajeCreateContainer(MSG_get_clock(), alias, "PROCESS",
- MSG_host_get_name(host), name);
- if (IS_TRACING_PROCESSES)
- pajeSetState(MSG_get_clock(), "category", alias, process->category);
- xbt_dict_set(process_containers, xbt_strdup(alias), xbt_strdup("1"),
- xbt_free);
+ char key[INSTR_DEFAULT_STR_SIZE];
+ snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", counter++);
+
+ int len = INSTR_DEFAULT_STR_SIZE;
+ char str[INSTR_DEFAULT_STR_SIZE];
+
+ //start link
+ container_t msg = PJ_container_get (instr_process_id(process, str, len));
+ type_t type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
+ new_pajeStartLink (MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
+
+ //destroy existing container of this process
+ TRACE_msg_process_destroy (MSG_process_get_name (process), MSG_process_get_PID (process), old_host);
+
+ //create new container on the new_host location
+ TRACE_msg_process_create (MSG_process_get_name (process), MSG_process_get_PID (process), new_host);
+
+ //end link
+ msg = PJ_container_get(instr_process_id(process, str, len));
+ type = PJ_type_get ("MSG_PROCESS_LINK", PJ_type_get_root());
+ new_pajeEndLink (MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);