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());
}
{
std::string id = netzone.getName();
- if (PJ_container_get_root() == nullptr){
+ if (simgrid::instr::Container::getRootContainer() == nullptr) {
simgrid::instr::NetZoneContainer* root = new simgrid::instr::NetZoneContainer(id, 0, nullptr);
if (TRACE_smpi_is_enabled()) {
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");
currentContainer.clear();
std::set<std::string>* filter = new std::set<std::string>;
XBT_DEBUG ("Starting graph extraction.");
- recursiveGraphExtraction(simgrid::s4u::Engine::getInstance()->getNetRoot(), PJ_container_get_root(), filter);
+ recursiveGraphExtraction(simgrid::s4u::Engine::getInstance()->getNetRoot(),
+ simgrid::instr::Container::getRootContainer(), filter);
XBT_DEBUG ("Graph extraction finished.");
delete filter;
platform_created = 1;
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);
std::map<std::string, xbt_node_t>* nodes = new std::map<std::string, xbt_node_t>;
std::map<std::string, xbt_edge_t>* edges = new std::map<std::string, xbt_edge_t>;
recursiveXBTGraphExtraction(ret, nodes, edges, simgrid::s4u::Engine::getInstance()->getNetRoot(),
- PJ_container_get_root());
+ simgrid::instr::Container::getRootContainer());
delete nodes;
delete edges;
return ret;