- std::string key;
- simgrid::instr::LinkType* link = nullptr;
- bool tracing = TRACE_actor_is_enabled();
- if (tracing) {
- 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();
- }