link->startEvent(msg, "M", key);
//destroy existing container of this process
- TRACE_msg_process_destroy (MSG_process_get_name (process), MSG_process_get_PID (process));
+ TRACE_msg_process_destroy(process);
//create new container on the new_host location
- TRACE_msg_process_create (MSG_process_get_name (process), MSG_process_get_PID (process), new_host);
+ TRACE_msg_process_create(process, new_host);
//end link
msg = simgrid::instr::Container::byName(instr_pid(process));
}
}
-void TRACE_msg_process_create(std::string process_name, int process_pid, msg_host_t host)
+void TRACE_msg_process_create(msg_process_t process, msg_host_t host)
{
if (TRACE_actor_is_enabled()) {
container_t host_container = simgrid::instr::Container::byName(host->getName());
- new simgrid::instr::Container(process_name + "-" + std::to_string(process_pid), "MSG_PROCESS", host_container);
+ new simgrid::instr::Container(instr_pid(process), "MSG_PROCESS", host_container);
}
}
-void TRACE_msg_process_destroy(std::string process_name, int process_pid)
+void TRACE_msg_process_destroy(msg_process_t process)
{
if (TRACE_actor_is_enabled()) {
- container_t process = simgrid::instr::Container::byNameOrNull(process_name + "-" + std::to_string(process_pid));
- if (process) {
- process->removeFromParent();
- delete process;
+ container_t container = simgrid::instr::Container::byNameOrNull(instr_pid(process));
+ if (container) {
+ container->removeFromParent();
+ delete container;
}
}
}
{
if (TRACE_actor_is_enabled() && status == SMX_EXIT_FAILURE) {
//kill means that this process no longer exists, let's destroy it
- TRACE_msg_process_destroy(process->getCname(), process->getPid());
+ TRACE_msg_process_destroy(process);
}
}
};
typedef s_MSG_Global_t* MSG_Global_t;
-XBT_PRIVATE void TRACE_msg_process_create(std::string process_name, int process_pid, msg_host_t host);
-XBT_PRIVATE void TRACE_msg_process_destroy(std::string process_name, int process_pid);
+XBT_PRIVATE void TRACE_msg_process_create(msg_process_t process, msg_host_t host);
+XBT_PRIVATE void TRACE_msg_process_destroy(msg_process_t process);
extern "C" {
simcall_process_set_data(smx_actor, nullptr);
}
- TRACE_msg_process_destroy(smx_actor->name, smx_actor->pid);
+ TRACE_msg_process_destroy(smx_actor->ciface());
// free the data if a function was provided
if (msg_actor && msg_actor->data && msg_global->process_data_cleanup) {
msg_global->process_data_cleanup(msg_actor->data);
simix_global->process_to_run.push_back(process);
intrusive_ptr_add_ref(process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->getName(), process->pid, process->host);
+ TRACE_msg_process_create(process->ciface(), process->host);
/* The onCreation() signal must be delayed until there, where the pid and everything is set */
simgrid::s4u::ActorPtr tmp = process->iface(); // Passing this directly to onCreation will lead to crashes
intrusive_ptr_add_ref(process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->getName(), process->pid, process->host);
+ TRACE_msg_process_create(process->ciface(), process->host);
auto* context = dynamic_cast<simgrid::kernel::context::AttachContext*>(process->context);
if (not context)