From: Martin Quinson Date: Thu, 8 Jun 2017 19:27:18 +0000 (+0200) Subject: Merge branch 'master' of github.com:simgrid/simgrid X-Git-Tag: v3.16~134^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fd7651841882fc2795ff07da448a240dbdc90220?hp=d1a328e48e23c005536f8514e567fb273554a36c Merge branch 'master' of github.com:simgrid/simgrid --- diff --git a/include/simgrid/s4u/NetZone.hpp b/include/simgrid/s4u/NetZone.hpp index 4dc88c3884..fe9d878cbb 100644 --- a/include/simgrid/s4u/NetZone.hpp +++ b/include/simgrid/s4u/NetZone.hpp @@ -68,6 +68,7 @@ public: std::vector* link_list)> onRouteCreation; static simgrid::xbt::signal onCreation; + static simgrid::xbt::signal onSeal; protected: std::vector diff --git a/src/s4u/s4u_netzone.cpp b/src/s4u/s4u_netzone.cpp index 38863221b2..1eec476116 100644 --- a/src/s4u/s4u_netzone.cpp +++ b/src/s4u/s4u_netzone.cpp @@ -21,6 +21,7 @@ simgrid::xbt::signal* link_list)> NetZone::onRouteCreation; simgrid::xbt::signal NetZone::onCreation; +simgrid::xbt::signal NetZone::onSeal; NetZone::NetZone(NetZone* father, const char* name) : father_(father), name_(xbt_strdup(name)) { diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index 4f4902a0a9..ed350fe675 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -195,7 +195,7 @@ static void sg_instr_AS_begin(simgrid::s4u::NetZone& netzone) } } -void sg_instr_AS_end() +static void sg_instr_AS_end(simgrid::s4u::NetZone& /*netzone*/) { if (TRACE_needs_platform()){ currentContainer.pop_back(); @@ -326,6 +326,7 @@ void instr_routing_define_callbacks () simgrid::s4u::Host::onCreation.connect(sg_instr_new_host); } simgrid::s4u::NetZone::onCreation.connect(sg_instr_AS_begin); + simgrid::s4u::NetZone::onSeal.connect(sg_instr_AS_end); } /* diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index f2be0fec9a..9079b8c2e2 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -677,10 +677,8 @@ void sg_platf_new_AS_seal() { xbt_assert(current_routing, "Cannot seal the current AS: none under construction"); current_routing->seal(); - current_routing = static_cast(current_routing->father()); - - if (TRACE_is_enabled()) - sg_instr_AS_end(); + simgrid::s4u::NetZone::onSeal(*current_routing); + current_routing = static_cast(current_routing->father()); } /** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */ diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index a5182d8c3f..931f78a7bc 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -241,7 +241,6 @@ XBT_PUBLIC(int) surf_parse_lex_destroy(); XBT_PUBLIC(void) routing_route_free(sg_platf_route_cbarg_t route); /********** Instr. **********/ XBT_PRIVATE void sg_instr_new_router(const char* name); -XBT_PRIVATE void sg_instr_AS_end(); SG_END_DECL()