/* 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 "src/instr/instr_private.hpp"
/* 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 "src/instr/instr_private.hpp"
static std::vector<simgrid::instr::NetZoneContainer*> currentContainer; /* push and pop, used only in creation */
static const char *instr_node_name (xbt_node_t node)
static std::vector<simgrid::instr::NetZoneContainer*> currentContainer; /* push and pop, used only in creation */
static const char *instr_node_name (xbt_node_t node)
- std::string aux1 = src->getName() + dst->getName();
- std::string aux2 = dst->getName() + src->getName();
+ std::string aux1 = src->get_name() + dst->get_name();
+ std::string aux2 = dst->get_name() + src->get_name();
- XBT_DEBUG(" linkContainers: already registered %s <-> %s (1)", src->getCname(), dst->getCname());
+ XBT_DEBUG(" linkContainers: already registered %s <-> %s (1)", src->get_cname(), dst->get_cname());
- XBT_DEBUG(" linkContainers: already registered %s <-> %s (2)", dst->getCname(), src->getCname());
+ XBT_DEBUG(" linkContainers: already registered %s <-> %s (2)", dst->get_cname(), src->get_cname());
- 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());
+ std::string link_typename = father->type_->get_name() + "-" + src->type_->get_name() +
+ std::to_string(src->type_->get_id()) + "-" + dst->type_->get_name() +
+ std::to_string(dst->type_->get_id());
simgrid::instr::LinkType* link = father->type_->getOrCreateLinkType(link_typename, src->type_, dst->type_);
link->setCallingContainer(father);
//register EDGE types for triva configuration
simgrid::instr::LinkType* link = father->type_->getOrCreateLinkType(link_typename, src->type_, dst->type_);
link->setCallingContainer(father);
//register EDGE types for triva configuration
link->startEvent(src, "topology", key);
link->endEvent(dst, "topology", key);
link->startEvent(src, "topology", key);
link->endEvent(dst, "topology", key);
if (simgrid::instr::Container::getRoot() == nullptr) {
simgrid::instr::NetZoneContainer* root = new simgrid::instr::NetZoneContainer(id, 0, nullptr);
if (simgrid::instr::Container::getRoot() == nullptr) {
simgrid::instr::NetZoneContainer* root = new simgrid::instr::NetZoneContainer(id, 0, nullptr);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_link())) {
simgrid::instr::VariableType* bandwidth = container->type_->getOrCreateVariableType("bandwidth", "");
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_link())) {
simgrid::instr::VariableType* bandwidth = container->type_->getOrCreateVariableType("bandwidth", "");
if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped())
container->type_->getOrCreateContainerType("MPI")->getOrCreateStateType("MPI_STATE");
if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped())
container->type_->getOrCreateContainerType("MPI")->getOrCreateStateType("MPI_STATE");
- if (TRACE_msg_process_is_enabled()) {
- simgrid::instr::ContainerType* msg_process = container->type_->getOrCreateContainerType("MSG_PROCESS");
- simgrid::instr::StateType* state = msg_process->getOrCreateStateType("MSG_PROCESS_STATE");
+ if (TRACE_actor_is_enabled()) {
+ 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");
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);
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");
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);
state->addEntityValue("send", "0 0 1");
state->addEntityValue("task_execute", "0 1 1");
root->type_->getOrCreateLinkType("MSG_VM_LINK", msg_vm, msg_vm);
}
}
static void sg_instr_new_router(simgrid::kernel::routing::NetPoint * netpoint)
{
if (netpoint->isRouter() && TRACE_is_enabled() && TRACE_needs_platform())
}
}
static void sg_instr_new_router(simgrid::kernel::routing::NetPoint * netpoint)
{
if (netpoint->isRouter() && TRACE_is_enabled() && TRACE_needs_platform())
*/
static void recursiveNewVariableType(std::string new_typename, std::string color, simgrid::instr::Type* root)
{
*/
static void recursiveNewVariableType(std::string new_typename, std::string color, simgrid::instr::Type* root)
{
root->getOrCreateVariableType(std::string("b") + new_typename, color);
for (auto elm : root->children_) {
root->getOrCreateVariableType(std::string("b") + new_typename, color);
for (auto elm : root->children_) {
static void recursiveNewUserVariableType(std::string father_type, std::string new_typename, std::string color,
simgrid::instr::Type* root)
{
static void recursiveNewUserVariableType(std::string father_type, std::string new_typename, std::string color,
simgrid::instr::Type* root)
{
root->getOrCreateVariableType(new_typename, color);
}
for (auto elm : root->children_)
root->getOrCreateVariableType(new_typename, color);
}
for (auto elm : root->children_)
static void recursiveNewUserStateType(std::string father_type, std::string new_typename, simgrid::instr::Type* root)
{
static void recursiveNewUserStateType(std::string father_type, std::string new_typename, simgrid::instr::Type* root)
{
static void recursiveNewValueForUserStateType(std::string type_name, const char* val, std::string color,
simgrid::instr::Type* root)
{
static void recursiveNewValueForUserStateType(std::string type_name, const char* val, std::string color,
simgrid::instr::Type* root)
{
static_cast<simgrid::instr::StateType*>(root)->addEntityValue(val, color);
for (auto elm : root->children_)
static_cast<simgrid::instr::StateType*>(root)->addEntityValue(val, color);
for (auto elm : root->children_)
recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Container::getRoot()->type_);
}
recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Container::getRoot()->type_);
}
#define GRAPHICATOR_SUPPORT_FUNCTIONS
static void recursiveXBTGraphExtraction(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
#define GRAPHICATOR_SUPPORT_FUNCTIONS
static void recursiveXBTGraphExtraction(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
if (not netzone->getChildren()->empty()) {
//bottom-up recursion
for (auto const& netzone_child : *netzone->getChildren()) {
if (not netzone->getChildren()->empty()) {
//bottom-up recursion
for (auto const& netzone_child : *netzone->getChildren()) {
recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
}
}
recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
}
}