filter->insert(aux2);
//declare type
- std::string link_typename = father->type_->getName() + "-" + src->type_->getName() + src->type_->getId() + "-" +
- dst->type_->getName() + dst->type_->getId();
- simgrid::instr::Type* link_type = father->type_->getOrCreateLinkType(link_typename, src->type_, dst->type_);
+ std::string link_typename = father->type_->getName() + "-" + src->type_->getName() +
+ std::to_string(src->type_->getId()) + "-" + dst->type_->getName() +
+ std::to_string(dst->type_->getId());
+ simgrid::instr::LinkType* link = father->type_->getOrCreateLinkType(link_typename, src->type_, dst->type_);
//register EDGE types for triva configuration
- trivaEdgeTypes.insert(link_type->getName());
+ trivaEdgeTypes.insert(link->getName());
//create the link
static long long counter = 0;
std::string key = std::to_string(counter);
counter++;
- new simgrid::instr::StartLinkEvent(SIMIX_get_clock(), father, link_type, src, "topology", key);
- new simgrid::instr::EndLinkEvent(SIMIX_get_clock(), father, link_type, dst, "topology", key);
+ link->startEvent(father, src, "topology", key);
+ link->endEvent(father, dst, "topology", key);
XBT_DEBUG(" linkContainers %s <-> %s", src->getCname(), dst->getCname());
}
container_t container = new simgrid::instr::Container(link.getName(), "LINK", father);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_link())) {
- simgrid::instr::Type* bandwidth = container->type_->getOrCreateVariableType("bandwidth", "");
- simgrid::instr::Type* latency = container->type_->getOrCreateVariableType("latency", "");
- new simgrid::instr::SetVariableEvent(0, container, bandwidth, link.bandwidth());
- new simgrid::instr::SetVariableEvent(0, container, latency, link.latency());
+ container->type_->getOrCreateVariableType("bandwidth", "")->setEvent(0, container, link.bandwidth());
+ container->type_->getOrCreateVariableType("latency", "")->setEvent(0, container, link.latency());
}
if (TRACE_uncategorized()) {
container->type_->getOrCreateVariableType("bandwidth_used", "0.5 0.5 0.5");
container_t container = new simgrid::instr::HostContainer(host, currentContainer.back());
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
- simgrid::instr::Type* speed = container->type_->getOrCreateVariableType("power", "");
- new simgrid::instr::SetVariableEvent(0, container, speed, host.getSpeed());
+ container->type_->getOrCreateVariableType("power", "")->setEvent(0, container, host.getSpeed());
}
if (TRACE_uncategorized())
container->type_->getOrCreateContainerType("MPI")->getOrCreateStateType("MPI_STATE");
if (TRACE_msg_process_is_enabled()) {
- simgrid::instr::Type* msg_process = container->type_->getOrCreateContainerType("MSG_PROCESS");
- simgrid::instr::Type* state = msg_process->getOrCreateStateType("MSG_PROCESS_STATE");
+ simgrid::instr::ContainerType* msg_process = container->type_->getOrCreateContainerType("MSG_PROCESS");
+ simgrid::instr::StateType* state = msg_process->getOrCreateStateType("MSG_PROCESS_STATE");
state->addEntityValue("suspend", "1 0 1");
state->addEntityValue("sleep", "1 1 0");
state->addEntityValue("receive", "1 0 0");
}
if (TRACE_msg_vm_is_enabled()) {
- simgrid::instr::Type* msg_vm = container->type_->getOrCreateContainerType("MSG_VM");
- simgrid::instr::Type* state = msg_vm->getOrCreateStateType("MSG_VM_STATE");
+ 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("sleep", "1 1 0");
state->addEntityValue("receive", "1 0 0");
static void recursiveNewUserStateType(std::string father_type, std::string new_typename, simgrid::instr::Type* root)
{
- if (root->getName() == father_type) {
+ if (root->getName() == father_type)
root->getOrCreateStateType(new_typename);
- }
+
for (auto elm : root->children_)
recursiveNewUserStateType(father_type, new_typename, elm.second);
}
simgrid::instr::Type* root)
{
if (root->getName() == type_name)
- root->addEntityValue(val, color);
+ static_cast<simgrid::instr::StateType*>(root)->addEntityValue(val, color);
for (auto elm : root->children_)
recursiveNewValueForUserStateType(type_name, val, color, elm.second);