Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
getting sg_instr_AS_end through a signal structure
[simgrid.git] / src / surf / sg_platf.cpp
index 0b49f04..d75966f 100644 (file)
@@ -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 */
@@ -664,8 +662,7 @@ simgrid::s4u::NetZone* sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
   /* set the new current component of the tree */
   current_routing = new_as;
 
-  if (TRACE_is_enabled())
-    sg_instr_AS_begin(AS);
+  simgrid::s4u::NetZone::onCreation(*new_as); // notify the signal
 
   return new_as;
 }
@@ -680,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<simgrid::kernel::routing::NetZoneImpl*>(current_routing->father());
-
-  if (TRACE_is_enabled())
-    sg_instr_AS_end();
+  simgrid::s4u::NetZone::onSeal(*current_routing);
+  current_routing = static_cast<simgrid::kernel::routing::NetZoneImpl*>(current_routing->father()); 
 }
 
 /** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */