/* 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::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_);
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_);
- link->startEvent(father, src, "topology", key);
- link->endEvent(father, dst, "topology", key);
+ link->startEvent(src, "topology", key);
+ link->endEvent(dst, "topology", key);
simgrid::instr::NetZoneContainer* root = new simgrid::instr::NetZoneContainer(id, 0, nullptr);
if (TRACE_smpi_is_enabled()) {
simgrid::instr::NetZoneContainer* root = new simgrid::instr::NetZoneContainer(id, 0, nullptr);
if (TRACE_smpi_is_enabled()) {
static void sg_instr_new_host(simgrid::s4u::Host& host)
{
container_t container = new simgrid::instr::HostContainer(host, currentContainer.back());
static void sg_instr_new_host(simgrid::s4u::Host& host)
{
container_t container = new simgrid::instr::HostContainer(host, currentContainer.back());
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
simgrid::instr::VariableType* power = container->type_->getOrCreateVariableType("power", "");
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
simgrid::instr::VariableType* power = container->type_->getOrCreateVariableType("power", "");
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);
currentContainer.clear();
std::set<std::string>* filter = new std::set<std::string>;
XBT_DEBUG ("Starting graph extraction.");
currentContainer.clear();
std::set<std::string>* filter = new std::set<std::string>;
XBT_DEBUG ("Starting graph extraction.");
- recursiveGraphExtraction(simgrid::s4u::Engine::getInstance()->getNetRoot(),
- simgrid::instr::Container::getRootContainer(), filter);
+ recursiveGraphExtraction(simgrid::s4u::Engine::getInstance()->getNetRoot(), simgrid::instr::Container::getRoot(),
+ filter);
}
static void recursiveNewUserVariableType(std::string father_type, std::string new_typename, std::string color,
}
static void recursiveNewUserVariableType(std::string father_type, std::string new_typename, std::string color,
void instr_new_user_variable_type(std::string father_type, std::string new_typename, std::string color)
{
void instr_new_user_variable_type(std::string father_type, std::string new_typename, std::string color)
{
- recursiveNewUserVariableType(father_type, new_typename, color, simgrid::instr::Container::getRootContainer()->type_);
+ recursiveNewUserVariableType(father_type, new_typename, color, simgrid::instr::Container::getRoot()->type_);
}
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)
- recursiveNewUserStateType(father_type, new_typename, simgrid::instr::Container::getRootContainer()->type_);
+ recursiveNewUserStateType(father_type, new_typename, simgrid::instr::Container::getRoot()->type_);
}
static void recursiveNewValueForUserStateType(std::string type_name, const char* val, std::string color,
}
static void recursiveNewValueForUserStateType(std::string type_name, const char* val, std::string color,
void instr_new_value_for_user_state_type(std::string type_name, const char* value, std::string color)
{
void instr_new_value_for_user_state_type(std::string type_name, const char* value, std::string color)
{
- recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Container::getRootContainer()->type_);
-}
-
-int instr_platform_traced ()
-{
- return platform_created;
+ recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Container::getRoot()->type_);
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(),
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(),