SimGrid (3.20) NOT RELEASED YET (Release target: June 21. 2018 10:07 UTC)
+TRACE
+ - Change --cfg=tracing/msg/vm to --cfg=tracing/vm as virtual machine
+ behavior tracing is no longer limited to MSG
----------------------------------------------------------------------------
SimGrid (3.19.1) Released March 22 2018
> %EndEventDef
> 0 1 0 HOST
> 6 0 1 1 0 "Tremblay"
-> 0 2 1 MSG_PROCESS
-> 2 3 2 MSG_PROCESS_STATE
+> 0 2 1 ACTOR
+> 2 3 2 ACTOR_STATE
> 5 4 3 suspend "1 0 1"
> 5 5 3 sleep "1 1 0"
> 5 6 3 receive "1 0 0"
> 5 7 3 send "0 0 1"
> 5 8 3 task_execute "0 1 1"
-> 4 9 0 2 2 MSG_PROCESS_LINK
-> 4 10 0 2 2 MSG_PROCESS_TASK_LINK
+> 4 9 0 2 2 ACTOR_LINK
+> 4 10 0 2 2 ACTOR_TASK_LINK
> 6 0 2 1 0 "Jupiter"
> 6 0 3 1 0 "Fafard"
> 6 0 4 1 0 "Ginette"
> 6 0 1 1 0 "Tremblay"
> 1 2 1 power "1 1 1"
> 1 3 1 power_used "0.5 0.5 0.5"
-> 0 4 1 MSG_PROCESS
-> 2 5 4 MSG_PROCESS_STATE
+> 0 4 1 ACTOR
+> 2 5 4 ACTOR_STATE
> 5 6 5 suspend "1 0 1"
> 5 7 5 sleep "1 1 0"
> 5 8 5 receive "1 0 0"
> 5 9 5 send "0 0 1"
> 5 10 5 task_execute "0 1 1"
-> 4 11 0 4 4 MSG_PROCESS_LINK
-> 4 12 0 4 4 MSG_PROCESS_TASK_LINK
+> 4 11 0 4 4 ACTOR_LINK
+> 4 12 0 4 4 ACTOR_TASK_LINK
> 6 0 2 1 0 "Jupiter"
> 6 0 3 1 0 "Fafard"
> 6 0 4 1 0 "Ginette"
> 6 0 1 1 0 "Tremblay"
> 1 2 1 power "1 1 1"
> 1 3 1 power_used "0.5 0.5 0.5"
-> 0 4 1 MSG_PROCESS
-> 2 5 4 MSG_PROCESS_STATE
+> 0 4 1 ACTOR
+> 2 5 4 ACTOR_STATE
> 5 6 5 suspend "1 0 1"
> 5 7 5 sleep "1 1 0"
> 5 8 5 receive "1 0 0"
> 5 9 5 send "0 0 1"
> 5 10 5 task_execute "0 1 1"
-> 4 11 0 4 4 MSG_PROCESS_LINK
-> 4 12 0 4 4 MSG_PROCESS_TASK_LINK
+> 4 11 0 4 4 ACTOR_LINK
+> 4 12 0 4 4 ACTOR_TASK_LINK
> 6 0 2 1 0 "Jupiter"
> 6 0 3 1 0 "Fafard"
> 6 0 4 1 0 "Ginette"
> %EndEventDef
> 0 1 0 HOST
> 6 0 1 1 0 "Tremblay"
-> 0 2 1 MSG_PROCESS
-> 2 3 2 MSG_PROCESS_STATE
+> 0 2 1 ACTOR
+> 2 3 2 ACTOR_STATE
> 5 4 3 suspend "1 0 1"
> 5 5 3 sleep "1 1 0"
> 5 6 3 receive "1 0 0"
> 5 7 3 send "0 0 1"
> 5 8 3 task_execute "0 1 1"
-> 4 9 0 2 2 MSG_PROCESS_LINK
-> 4 10 0 2 2 MSG_PROCESS_TASK_LINK
+> 4 9 0 2 2 ACTOR_LINK
+> 4 10 0 2 2 ACTOR_TASK_LINK
> 6 0 2 1 0 "Jupiter"
> 6 0 3 1 0 "Fafard"
> 6 0 4 1 0 "Ginette"
XBT_PUBLIC int sg_actor_is_suspended(sg_actor_t actor);
XBT_PUBLIC sg_actor_t sg_actor_restart(sg_actor_t actor);
XBT_PUBLIC void sg_actor_daemonize(sg_actor_t actor);
+XBT_PUBLIC void sg_actor_migrate(sg_actor_t process, sg_host_t host);
SG_END_DECL()
XBT_PUBLIC int MSG_process_is_suspended(msg_process_t process);
XBT_PUBLIC void MSG_process_restart(msg_process_t process);
XBT_PUBLIC void MSG_process_daemonize(msg_process_t process);
+XBT_PUBLIC void MSG_process_migrate(msg_process_t process, msg_host_t host);
/* ******************************** File ************************************ */
typedef sg_file_t msg_file_t;
XBT_PUBLIC void MSG_process_kill(msg_process_t process);
XBT_PUBLIC int MSG_process_killall();
-XBT_PUBLIC msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host);
XBT_PUBLIC void MSG_process_yield();
XBT_PUBLIC void MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup);
return;
}
- /* try to change the host of the process */
- msg_error_t rv = MSG_process_migrate(process, host);
- if (rv != MSG_OK) {
- jmsg_throw_status(env,rv);
- return;
- }
+ /* change the host of the process */
+ process->migrate(host);
+
/* change the host java side */
env->SetObjectField(jprocess, jprocess_field_Process_host, jhost);
}
#define OPT_TRACING_FILENAME "tracing/filename"
#define OPT_TRACING_FORMAT_TI_ONEFILE "tracing/smpi/format/ti-one-file"
#define OPT_TRACING_FORMAT "tracing/smpi/format"
-#define OPT_TRACING_MSG_PROCESS "tracing/msg/process"
-#define OPT_TRACING_MSG_VM "tracing/msg/vm"
+#define OPT_TRACING_ACTOR "tracing/msg/process"
+#define OPT_TRACING_VM "tracing/vm"
#define OPT_TRACING_PLATFORM "tracing/platform"
#define OPT_TRACING_PRECISION "tracing/precision"
#define OPT_TRACING_SMPI_COMPUTING "tracing/smpi/computing"
static bool trace_categorized;
static bool trace_uncategorized;
static bool trace_actor_enabled;
-static bool trace_msg_vm_enabled;
+static bool trace_vm_enabled;
static bool trace_buffer;
static bool trace_disable_destroy;
static bool trace_basic;
trace_view_internals = xbt_cfg_get_boolean(OPT_TRACING_SMPI_INTERNALS);
trace_categorized = xbt_cfg_get_boolean(OPT_TRACING_CATEGORIZED);
trace_uncategorized = xbt_cfg_get_boolean(OPT_TRACING_UNCATEGORIZED);
- trace_actor_enabled = trace_enabled && xbt_cfg_get_boolean(OPT_TRACING_MSG_PROCESS);
- trace_msg_vm_enabled = xbt_cfg_get_boolean(OPT_TRACING_MSG_VM);
+ trace_actor_enabled = trace_enabled && xbt_cfg_get_boolean(OPT_TRACING_ACTOR);
+ trace_vm_enabled = xbt_cfg_get_boolean(OPT_TRACING_VM);
trace_buffer = xbt_cfg_get_boolean(OPT_TRACING_BUFFER);
trace_disable_destroy = xbt_cfg_get_boolean(OPT_TRACING_DISABLE_DESTROY);
trace_basic = xbt_cfg_get_boolean(OPT_TRACING_BASIC);
bool TRACE_needs_platform ()
{
- return TRACE_actor_is_enabled() || TRACE_msg_vm_is_enabled() || TRACE_categorized() || TRACE_uncategorized() ||
+ return TRACE_actor_is_enabled() || TRACE_vm_is_enabled() || TRACE_categorized() || TRACE_uncategorized() ||
TRACE_platform() || (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped());
}
return trace_actor_enabled;
}
-bool TRACE_msg_vm_is_enabled()
+bool TRACE_vm_is_enabled()
{
- return trace_msg_vm_enabled && TRACE_is_enabled();
+ return trace_vm_enabled && TRACE_is_enabled();
}
bool TRACE_disable_link()
xbt_cfg_register_boolean(OPT_TRACING_CATEGORIZED, "no", nullptr, "Tracing categorized resource utilization of hosts and links.");
xbt_cfg_register_boolean(OPT_TRACING_UNCATEGORIZED, "no", nullptr, "Tracing uncategorized resource utilization of hosts and links.");
- xbt_cfg_register_boolean(OPT_TRACING_MSG_PROCESS, "no", nullptr, "Tracing of MSG process behavior.");
- xbt_cfg_register_boolean(OPT_TRACING_MSG_VM, "no", nullptr, "Tracing of MSG process behavior.");
+ xbt_cfg_register_boolean(OPT_TRACING_ACTOR, "no", nullptr, "Tracing of actor behavior.");
+ xbt_cfg_register_boolean(OPT_TRACING_VM, "no", nullptr, "Tracing of virtual machine behavior.");
xbt_cfg_register_boolean(OPT_TRACING_DISABLE_LINK, "no", nullptr, "Do not trace link bandwidth and latency.");
xbt_cfg_register_boolean(OPT_TRACING_DISABLE_POWER, "no", nullptr, "Do not trace host power.");
xbt_cfg_register_boolean(OPT_TRACING_BUFFER, "yes", nullptr, "Buffer trace events to put them in temporal order.");
" to allow further study of simulated or real sleep time", detailed);
print_line (OPT_TRACING_SMPI_INTERNALS, "Generates tracing events corresponding",
" to point-to-point messages sent by collective communications", detailed);
- print_line (OPT_TRACING_MSG_PROCESS, "Trace processes behavior (MSG)",
- " This option only has effect if this simulator is MSG-based. It traces the\n"
- " behavior of all categorized MSG processes, grouping them by hosts. This option\n"
- " can be used to track process location if this simulator has process migration.", detailed);
+ print_line(OPT_TRACING_ACTOR, "Trace actor behavior",
+ " This option traces the behavior of all categorized actors, grouping them\n"
+ " by hosts. This option can be used to track actor location if the simulator\n"
+ " does actor migration.",
+ detailed);
print_line (OPT_TRACING_BUFFER, "Buffer events to put them in temporal order",
" This option put some events in a time-ordered buffer using the insertion\n"
" sort algorithm. The process of acquiring and releasing locks to access this\n"
XBT_DEBUG("removeChildContainer (%s) FromContainer (%s) ", getCname(), father_->getCname());
father_->children_.erase(name_);
}
+ delete this;
}
void Container::logCreation()
XBT_PRIVATE bool TRACE_categorized();
XBT_PRIVATE bool TRACE_uncategorized();
XBT_PRIVATE bool TRACE_actor_is_enabled();
-XBT_PRIVATE bool TRACE_msg_vm_is_enabled();
+XBT_PRIVATE bool TRACE_vm_is_enabled();
XBT_PRIVATE bool TRACE_buffer();
XBT_PRIVATE bool TRACE_disable_link();
XBT_PRIVATE bool TRACE_disable_speed();
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "simgrid/s4u/Host.hpp"
#include "src/instr/instr_private.hpp"
#include "src/msg/msg_private.hpp"
#include "src/simix/ActorImpl.hpp"
return std::string(proc->getCname()) + "-" + std::to_string(proc->getPid());
}
-void TRACE_msg_process_change_host(msg_process_t process, msg_host_t new_host)
-{
- if (TRACE_actor_is_enabled()) {
- static long long int counter = 0;
-
- std::string key = std::to_string(counter);
- counter++;
-
- //start link
- container_t msg = simgrid::instr::Container::byName(instr_pid(process));
- simgrid::instr::LinkType* link = simgrid::instr::Container::getRoot()->getLink("MSG_PROCESS_LINK");
- link->startEvent(msg, "M", key);
-
- //destroy existing container of this process
- TRACE_msg_process_destroy(process);
-
- //create new container on the new_host location
- TRACE_msg_process_create(process, new_host);
-
- //end link
- msg = simgrid::instr::Container::byName(instr_pid(process));
- link->endEvent(msg, "M", key);
- }
-}
-
-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(instr_pid(process), "MSG_PROCESS", host_container);
- }
-}
-
-void TRACE_msg_process_destroy(msg_process_t process)
-{
- if (TRACE_actor_is_enabled()) {
- container_t container = simgrid::instr::Container::byNameOrNull(instr_pid(process));
- if (container) {
- container->removeFromParent();
- delete container;
- }
- }
-}
-
void TRACE_msg_process_kill(smx_process_exit_status_t status, msg_process_t process)
{
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);
+ simgrid::instr::Container::byName(instr_pid(process))->removeFromParent();
}
}
if (TRACE_actor_is_enabled())
simgrid::instr::Container::byName(instr_pid(MSG_process_self()))
- ->getState("MSG_PROCESS_STATE")
+ ->getState("ACTOR_STATE")
->pushEvent("task_execute");
}
XBT_DEBUG("EXEC,out %p, %lld, %s", task, task->counter, task->category);
if (TRACE_actor_is_enabled())
- simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("MSG_PROCESS_STATE")->popEvent();
+ simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("ACTOR_STATE")->popEvent();
}
/* MSG_task_destroy related functions */
XBT_DEBUG("GET,in");
if (TRACE_actor_is_enabled())
- simgrid::instr::Container::byName(instr_pid(MSG_process_self()))
- ->getState("MSG_PROCESS_STATE")
- ->pushEvent("receive");
+ simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("ACTOR_STATE")->pushEvent("receive");
}
void TRACE_msg_task_get_end(msg_task_t task)
if (TRACE_actor_is_enabled()) {
container_t process_container = simgrid::instr::Container::byName(instr_pid(MSG_process_self()));
- process_container->getState("MSG_PROCESS_STATE")->popEvent();
+ process_container->getState("ACTOR_STATE")->popEvent();
std::string key = std::string("p") + std::to_string(task->counter);
- simgrid::instr::Container::getRoot()->getLink("MSG_PROCESS_TASK_LINK")->endEvent(process_container, "SR", key);
+ simgrid::instr::Container::getRoot()->getLink("ACTOR_TASK_LINK")->endEvent(process_container, "SR", key);
}
}
if (TRACE_actor_is_enabled()) {
container_t process_container = simgrid::instr::Container::byName(instr_pid(MSG_process_self()));
- process_container->getState("MSG_PROCESS_STATE")->pushEvent("send");
+ process_container->getState("ACTOR_STATE")->pushEvent("send");
std::string key = std::string("p") + std::to_string(task->counter);
- simgrid::instr::Container::getRoot()->getLink("MSG_PROCESS_TASK_LINK")->startEvent(process_container, "SR", key);
+ simgrid::instr::Container::getRoot()->getLink("ACTOR_TASK_LINK")->startEvent(process_container, "SR", key);
}
return 1;
XBT_DEBUG("PUT,out");
if (TRACE_actor_is_enabled())
- simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("MSG_PROCESS_STATE")->popEvent();
+ simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("ACTOR_STATE")->popEvent();
}
msg_error_t status = MSG_OK;
if (TRACE_actor_is_enabled())
- simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("MSG_PROCESS_STATE")->pushEvent("sleep");
+ simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("ACTOR_STATE")->pushEvent("sleep");
try {
simcall_process_sleep(nb_sec);
}
if (TRACE_actor_is_enabled())
- simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("MSG_PROCESS_STATE")->popEvent();
+ simgrid::instr::Container::byName(instr_pid(MSG_process_self()))->getState("ACTOR_STATE")->popEvent();
return status;
}
{
sg_actor_daemonize(actor);
}
+void MSG_process_migrate(sg_actor_t actor, sg_host_t host)
+{
+ sg_actor_migrate(actor, host);
+}
/* ************************** NetZones *************************** */
sg_netzone_t MSG_zone_get_root()
};
typedef s_MSG_Global_t* MSG_Global_t;
-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" {
XBT_PUBLIC_DATA MSG_Global_t msg_global;
XBT_PRIVATE void TRACE_msg_task_put_end();
/* declaration of instrumentation functions from msg_process_instr.c */
-XBT_PRIVATE void TRACE_msg_process_change_host(msg_process_t process, msg_host_t new_host);
XBT_PRIVATE void TRACE_msg_process_kill(smx_process_exit_status_t status, msg_process_t process);
}
simcall_process_set_data(smx_actor, nullptr);
}
- TRACE_msg_process_destroy(smx_actor->ciface());
+ if (TRACE_actor_is_enabled())
+ simgrid::instr::Container::byName(instr_pid(smx_actor->ciface()))->removeFromParent();
+
// 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);
return MSG_OK;
}
-/** \ingroup m_process_management
- * \brief Migrates a process to another location.
- *
- * This function checks whether \a process and \a host are valid pointers and change the value of the #msg_host_t on
- * which \a process is running.
- */
-msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host)
-{
- TRACE_msg_process_change_host(process, host);
- process->migrate(host);
- return MSG_OK;
-}
-
/** Yield the current actor; let the other actors execute first */
void MSG_process_yield()
{
vm_->getImpl()->isMigrating = false;
XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", vm_->getCname(), src_pm_->getCname(), dst_pm_->getCname());
- if (TRACE_msg_vm_is_enabled()) {
+ if (TRACE_vm_is_enabled()) {
static long long int counter = 0;
std::string key = std::to_string(counter);
counter++;
simgrid::instr::Container::getRoot()->getLink("MSG_VM_LINK")->startEvent(msg, "M", key);
// destroy existing container of this vm
- container_t existing_container = simgrid::instr::Container::byName(vm_->getName());
- existing_container->removeFromParent();
- delete existing_container;
+ simgrid::instr::Container::byName(vm_->getName())->removeFromParent();
// create new container on the new_host location
new simgrid::instr::Container(vm_->getCname(), "MSG_VM", simgrid::instr::Container::byName(dst_pm_->getName()));
/* Make a process container */
extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
- if (TRACE_msg_vm_is_enabled()) {
+ if (TRACE_vm_is_enabled()) {
container_t host_container = instr::Container::byName(pm->getName());
new instr::Container(name, "MSG_VM", host_container);
instr::Container::byName(getName())->getState("MSG_VM_STATE")->addEntityValue("start", "0 0 1"); // start is blue
/* Don't free these things twice: they are the ones of my physical host */
pimpl_netpoint = nullptr;
- if (TRACE_msg_vm_is_enabled()) {
- container_t container = simgrid::instr::Container::byName(getName());
- container->removeFromParent();
- delete container;
- }
+ if (TRACE_vm_is_enabled())
+ simgrid::instr::Container::byName(getName())->removeFromParent();
}
void VirtualMachine::start()
{
- if (TRACE_msg_vm_is_enabled())
+ if (TRACE_vm_is_enabled())
simgrid::instr::Container::byName(getName())->getState("MSG_VM_STATE")->pushEvent("start");
simgrid::simix::kernelImmediate([this]() {
this->pimpl_vm_->setState(SURF_VM_STATE_RUNNING);
});
- if (TRACE_msg_vm_is_enabled())
+ if (TRACE_vm_is_enabled())
simgrid::instr::Container::byName(getName())->getState("MSG_VM_STATE")->popEvent();
}
{
smx_actor_t issuer = SIMIX_process_self();
simgrid::simix::kernelImmediate([this, issuer]() { pimpl_vm_->suspend(issuer); });
- if (TRACE_msg_vm_is_enabled())
+ if (TRACE_vm_is_enabled())
simgrid::instr::Container::byName(getName())->getState("MSG_VM_STATE")->pushEvent("suspend");
XBT_DEBUG("vm_suspend done");
}
void VirtualMachine::resume()
{
pimpl_vm_->resume();
- if (TRACE_msg_vm_is_enabled())
+ if (TRACE_vm_is_enabled())
simgrid::instr::Container::byName(getName())->getState("MSG_VM_STATE")->popEvent();
}
*/
void Actor::migrate(Host* new_host)
{
+ std::string key;
+ simgrid::instr::LinkType* link = nullptr;
+ if (TRACE_actor_is_enabled()) {
+ static long long int counter = 0;
+
+ key = std::to_string(counter);
+ counter++;
+
+ // start link
+ container_t actor_container = simgrid::instr::Container::byName(instr_pid(this));
+ link = simgrid::instr::Container::getRoot()->getLink("ACTOR_LINK");
+ link->startEvent(actor_container, "M", key);
+
+ // destroy existing container of this process
+ actor_container->removeFromParent();
+ }
+
simgrid::simix::kernelImmediate([this, new_host]() {
if (pimpl_->waiting_synchro != nullptr) {
// The actor is blocked on an activity. If it's an exec, migrate it too.
}
SIMIX_process_change_host(this->pimpl_, new_host);
});
+
+ if (TRACE_actor_is_enabled()) {
+ // create new container on the new_host location
+ new simgrid::instr::Container(instr_pid(this), "ACTOR", simgrid::instr::Container::byName(new_host->getName()));
+
+ // end link
+ link->endEvent(simgrid::instr::Container::byName(instr_pid(this)), "M", key);
+ }
}
s4u::Host* Actor::getHost()
void Actor::suspend()
{
if (TRACE_actor_is_enabled())
- simgrid::instr::Container::byName(instr_pid(this))->getState("MSG_PROCESS_STATE")->pushEvent("suspend");
+ simgrid::instr::Container::byName(instr_pid(this))->getState("ACTOR_STATE")->pushEvent("suspend");
simcall_process_suspend(pimpl_);
}
{
simgrid::simix::kernelImmediate([this] { pimpl_->resume(); });
if (TRACE_actor_is_enabled())
- simgrid::instr::Container::byName(instr_pid(this))->getState("MSG_PROCESS_STATE")->popEvent();
+ simgrid::instr::Container::byName(instr_pid(this))->getState("ACTOR_STATE")->popEvent();
}
int Actor::isSuspended()
void suspend()
{
if (TRACE_actor_is_enabled())
- instr::Container::byName(getName() + "-" + std::to_string(getPid()))
- ->getState("MSG_PROCESS_STATE")
- ->pushEvent("suspend");
+ instr::Container::byName(getName() + "-" + std::to_string(getPid()))->getState("ACTOR_STATE")->pushEvent("suspend");
simcall_process_suspend(SIMIX_process_self());
}
simgrid::simix::kernelImmediate([process] { process->resume(); });
if (TRACE_actor_is_enabled())
- instr::Container::byName(getName() + "-" + std::to_string(getPid()))->getState("MSG_PROCESS_STATE")->popEvent();
+ instr::Container::byName(getName() + "-" + std::to_string(getPid()))->getState("ACTOR_STATE")->popEvent();
}
bool isSuspended()
actor->daemonize();
}
+/** \ingroup m_process_management
+ * \brief Migrates an actor to another location.
+ *
+ * This function changes the value of the #sg_host_t on which \a actor is running.
+ */
+void sg_actor_migrate(sg_actor_t process, sg_host_t host)
+{
+ process->migrate(host);
+}
+
SG_END_DECL()
simix_global->process_to_run.push_back(process);
intrusive_ptr_add_ref(process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->ciface(), process->host);
+ if (TRACE_actor_is_enabled())
+ new simgrid::instr::Container(instr_pid(process->ciface()), "ACTOR",
+ simgrid::instr::Container::byName(process->host->getName()));
/* 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->ciface(), process->host);
+ if (TRACE_actor_is_enabled())
+ new simgrid::instr::Container(instr_pid(process->ciface()), "ACTOR",
+ simgrid::instr::Container::byName(process->host->getName()));
auto* context = dynamic_cast<simgrid::kernel::context::AttachContext*>(process->context);
if (not context)
if (not TRACE_smpi_is_enabled())
return;
- container_t container = smpi_container(rank);
- container->removeFromParent();
- delete container;
+ smpi_container(rank)->removeFromParent();
}
void TRACE_smpi_computing_init(int rank)
container->type_->getOrCreateContainerType("MPI")->getOrCreateStateType("MPI_STATE");
if (TRACE_actor_is_enabled()) {
- simgrid::instr::ContainerType* msg_process = container->type_->getOrCreateContainerType("MSG_PROCESS");
- simgrid::instr::StateType* state = msg_process->getOrCreateStateType("MSG_PROCESS_STATE");
+ simgrid::instr::ContainerType* actor = container->type_->getOrCreateContainerType("ACTOR");
+ simgrid::instr::StateType* state = actor->getOrCreateStateType("ACTOR_STATE");
state->addEntityValue("suspend", "1 0 1");
state->addEntityValue("sleep", "1 1 0");
state->addEntityValue("receive", "1 0 0");
state->addEntityValue("send", "0 0 1");
state->addEntityValue("task_execute", "0 1 1");
- root->type_->getOrCreateLinkType("MSG_PROCESS_LINK", msg_process, msg_process);
- root->type_->getOrCreateLinkType("MSG_PROCESS_TASK_LINK", msg_process, msg_process);
+ root->type_->getOrCreateLinkType("ACTOR_LINK", actor, actor);
+ root->type_->getOrCreateLinkType("ACTOR_TASK_LINK", actor, actor);
}
- if (TRACE_msg_vm_is_enabled()) {
+ if (TRACE_vm_is_enabled()) {
simgrid::instr::ContainerType* msg_vm = container->type_->getOrCreateContainerType("MSG_VM");
simgrid::instr::StateType* state = msg_vm->getOrCreateStateType("MSG_VM_STATE");
state->addEntityValue("suspend", "1 0 1");
state->addEntityValue("send", "0 0 1");
state->addEntityValue("task_execute", "0 1 1");
root->type_->getOrCreateLinkType("MSG_VM_LINK", msg_vm, msg_vm);
- root->type_->getOrCreateLinkType("MSG_VM_PROCESS_LINK", msg_vm, msg_vm);
+ root->type_->getOrCreateLinkType("MSG_VM_ACTOR_LINK", msg_vm, msg_vm);
}
}