X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ecd5f7562caf1d443bf22788fa5f4fac408776ec..3cbf54871089cc3dc50b6832652b5765e1601039:/src/surf/instr_routing.cpp diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index 6a271cdf5f..fcb53ce652 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -1,14 +1,14 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */ /* 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" +#include "simgrid/kernel/routing/NetPoint.hpp" +#include "simgrid/kernel/routing/NetZoneImpl.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" -#include "src/kernel/routing/NetPoint.hpp" -#include "src/kernel/routing/NetZoneImpl.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" #include "surf/surf.hpp" @@ -16,7 +16,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy"); -static int platform_created = 0; /* indicate whether the platform file has been traced */ static std::vector currentContainer; /* push and pop, used only in creation */ static const char *instr_node_name (xbt_node_t node) @@ -223,19 +222,19 @@ static void sg_instr_new_host(simgrid::s4u::Host& host) 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"); - 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); } - if (TRACE_msg_vm_is_enabled()) { + if (TRACE_vm_is_enabled()) { 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"); @@ -244,7 +243,7 @@ static void sg_instr_new_host(simgrid::s4u::Host& host) state->addEntityValue("send", "0 0 1"); state->addEntityValue("task_execute", "0 1 1"); root->type_->getOrCreateLinkType("MSG_VM_LINK", msg_vm, msg_vm); - root->type_->getOrCreateLinkType("MSG_VM_PROCESS_LINK", msg_vm, msg_vm); + root->type_->getOrCreateLinkType("MSG_VM_ACTOR_LINK", msg_vm, msg_vm); } } @@ -263,7 +262,6 @@ static void instr_routing_parse_end_platform () filter); XBT_DEBUG ("Graph extraction finished."); delete filter; - platform_created = 1; TRACE_paje_dump_buffer(true); } @@ -346,11 +344,6 @@ void instr_new_value_for_user_state_type(std::string type_name, const char* valu recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Container::getRoot()->type_); } -int instr_platform_traced () -{ - return platform_created; -} - #define GRAPHICATOR_SUPPORT_FUNCTIONS static void recursiveXBTGraphExtraction(xbt_graph_t graph, std::map* nodes,