From af1adb0177f8402c6fe071f6043d64e009d2b439 Mon Sep 17 00:00:00 2001 From: Takishipp Date: Fri, 2 Jun 2017 10:13:46 +0200 Subject: [PATCH] call sg_instr_new_host via signal call --- src/surf/instr_routing.cpp | 1 + src/surf/sg_platf.cpp | 4 +--- src/surf/xml/platf_private.hpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index 72d975cc47..b424b7acfa 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -322,6 +322,7 @@ void instr_routing_define_callbacks () return; simgrid::s4u::Link::onCreation.connect(instr_routing_parse_start_link); simgrid::s4u::onPlatformCreated.connect(instr_routing_parse_end_platform); + simgrid::s4u::Host::onCreation.connect(sg_instr_new_host); } /* diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 0b49f04701..2e10ec0209 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -99,9 +99,7 @@ void sg_platf_new_host(sg_platf_host_cbarg_t args) host->pimpl_cpu->setPState(args->pstate); if (args->coord && strcmp(args->coord, "")) new simgrid::kernel::routing::vivaldi::Coords(host->pimpl_netpoint, args->coord); - - if (TRACE_is_enabled() && TRACE_needs_platform()) - sg_instr_new_host(*host); + } /** @brief Add a "router" to the network element list */ diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index 1ffead70a9..5c4858d9af 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -247,7 +247,7 @@ XBT_PUBLIC(void) routing_route_free(sg_platf_route_cbarg_t route); /********** Instr. **********/ XBT_PRIVATE void sg_instr_AS_begin(sg_platf_AS_cbarg_t AS); XBT_PRIVATE void sg_instr_new_router(const char* name); -XBT_PRIVATE void sg_instr_new_host(simgrid::s4u::Host& host); +void sg_instr_new_host(simgrid::s4u::Host& host); XBT_PRIVATE void sg_instr_AS_end(); SG_END_DECL() -- 2.20.1