Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
re-organizing tracing masks and first support for "swarm-based" traces of tasks or...
[simgrid.git] / src / instr / surf_instr.c
index 6ce676d..a81f320 100644 (file)
@@ -234,12 +234,7 @@ void __TRACE_surf_set_resource_variable (double date, const char *variable, cons
   xbt_dict_set (resource_variables, xbt_strdup(key), xbt_strdup(aux), xbt_free);
 }
 
-void TRACE_surf_update_action_state (void *surf_action, smx_action_t smx_action,
-    double value, const char *stateValue, double now, double delta)
-{
-}
-
-void TRACE_surf_update_action_state_net_resource (const char *name, smx_action_t smx_action, double value, double now, double delta)
+void TRACE_surf_link_set_utilization (const char *name, smx_action_t smx_action, double value, double now, double delta)
 {
   if (!IS_TRACING || !IS_TRACED(smx_action)) return;
 
@@ -251,7 +246,7 @@ void TRACE_surf_update_action_state_net_resource (const char *name, smx_action_t
   if (value == 0) return;
 
   if (!xbt_dict_get_or_null (created_links, name)){
-    TRACE_surf_missing_link ();
+    TRACE_surf_link_missing ();
     return;
   }
 
@@ -261,7 +256,7 @@ void TRACE_surf_update_action_state_net_resource (const char *name, smx_action_t
   return;
 }
 
-void TRACE_surf_update_action_state_cpu_resource (const char *name, smx_action_t smx_action, double value, double now, double delta)
+void TRACE_surf_host_set_utilization (const char *name, smx_action_t smx_action, double value, double now, double delta)
 {
   if (!IS_TRACING || !IS_TRACED(smx_action)) return;
 
@@ -275,7 +270,7 @@ void TRACE_surf_update_action_state_cpu_resource (const char *name, smx_action_t
   return;
 }
 
-void TRACE_surf_net_link_new (char *name, double bw, double lat)
+void TRACE_surf_link_declaration (char *name, double bw, double lat)
 {
   if (!IS_TRACING) return;
   //if (IS_TRACING_PLATFORM) pajeCreateContainerWithBandwidthLatency (SIMIX_get_clock(), name, "LINK", "platform", name, bw, lat);
@@ -289,17 +284,17 @@ void TRACE_surf_net_link_new (char *name, double bw, double lat)
   xbt_dict_set (link_latency, xbt_strdup(name), lat_ptr, xbt_free);
 }
 
-void TRACE_surf_cpu_new (char *name, double power)
+void TRACE_surf_host_declaration (char *name, double power)
 {
   if (!IS_TRACING) return;
+  pajeCreateContainer (SIMIX_get_clock(), name, "HOST", "platform", name);
+  xbt_dict_set (host_containers, xbt_strdup(name), xbt_strdup("1"), xbt_free);
   if (IS_TRACING_PLATFORM){
-       pajeCreateContainer (SIMIX_get_clock(), name, "HOST", "platform", name);
-       xbt_dict_set (host_containers, xbt_strdup(name), xbt_strdup("1"), xbt_free);
+    __TRACE_surf_set_resource_variable (SIMIX_get_clock(), "power", name, power);
   }
-  __TRACE_surf_set_resource_variable (SIMIX_get_clock(), "power", name, power);
 }
 
-void TRACE_surf_routing_full_parse_end (char *link_name, int src, int dst)
+void TRACE_surf_link_save_endpoints (char *link_name, int src, int dst)
 {
   if (!IS_TRACING) return;
   char srcidstr[100], dstidstr[100];
@@ -321,14 +316,14 @@ void TRACE_surf_routing_full_parse_end (char *link_name, int src, int dst)
     //if (IS_TRACING_PLATFORM) pajeEndLink (SIMIX_get_clock()+0.1, "edge", "platform", "route", dstname, key);
     double *bw = xbt_dict_get (link_bandwidth, link_name);
     double *lat = xbt_dict_get (link_latency, link_name);
-    if (IS_TRACING_PLATFORM) pajeCreateContainerWithBandwidthLatencySrcDst (SIMIX_get_clock(), link_name, "LINK", "platform", link_name, *bw, *lat, srcname, dstname);
-    __TRACE_surf_set_resource_variable (SIMIX_get_clock(), "bandwidth", link_name, *bw);
-    __TRACE_surf_set_resource_variable (SIMIX_get_clock(), "latency", link_name, *lat);
+    pajeCreateContainerWithBandwidthLatencySrcDst (SIMIX_get_clock(), link_name, "LINK", "platform", link_name, *bw, *lat, srcname, dstname);
+    if (IS_TRACING_PLATFORM) __TRACE_surf_set_resource_variable (SIMIX_get_clock(), "bandwidth", link_name, *bw);
+    if (IS_TRACING_PLATFORM) __TRACE_surf_set_resource_variable (SIMIX_get_clock(), "latency", link_name, *lat);
     xbt_dict_set (created_links, xbt_strdup(link_name), xbt_strdup ("1"), xbt_free);
   }
 }
 
-void TRACE_surf_cpu_set_power (double date, char *resource, double power)
+void TRACE_surf_host_set_power (double date, char *resource, double power)
 {
   __TRACE_surf_set_resource_variable (date, "power", resource, power);
 }
@@ -343,7 +338,7 @@ void TRACE_surf_link_set_latency (double date, char *resource, double latency)
   __TRACE_surf_set_resource_variable (date, "latency", resource, latency);
 }
 
-void TRACE_surf_define_host_id (const char *name, int host_id)
+void TRACE_surf_host_define_id (const char *name, int host_id)
 {
   if (!IS_TRACING) return;
   char strid[100];
@@ -402,7 +397,7 @@ void TRACE_surf_gtnets_destroy (void *action)
   xbt_dict_remove (gtnets_dst, key);
 }
 
-void TRACE_surf_missing_link (void)
+void TRACE_surf_link_missing (void)
 {
   CRITICAL0("The trace cannot be done because "
                 "the platform you are using contains "
@@ -415,16 +410,15 @@ void TRACE_msg_clean (void)
   __TRACE_surf_finalize();
 
   xbt_dict_cursor_t cursor = NULL;
-  unsigned int cursor_ar = 0;
   char *key, *value;
 
   /* get all host from host_containers */
   xbt_dict_foreach(host_containers, cursor, key, value) {
-    if (IS_TRACING_PLATFORM) pajeDestroyContainer (MSG_get_clock(), "HOST", key);
+    pajeDestroyContainer (MSG_get_clock(), "HOST", key);
   }
 }
 
-void TRACE_surf_vivaldi_parse_host (char *host, double x, double y, double h)
+void TRACE_surf_host_vivaldi_parse (char *host, double x, double y, double h)
 {
   if (!IS_TRACING || !IS_TRACING_PLATFORM) return;