Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleaning tracing code
[simgrid.git] / src / instr / surf_instr.c
index 0660513..cca1d54 100644 (file)
@@ -23,8 +23,6 @@ static xbt_dict_t created_links;
 static xbt_dict_t link_bandwidth;
 static xbt_dict_t link_latency;
 static xbt_dict_t host_containers;
-//static xbt_dict_t platform_variable_last_value; /* to control the amount of add/sub variables events*/
-//static xbt_dict_t platform_variable_last_time; /* to control the amount of add/sub variables events*/
 
 static xbt_dict_t last_platform_variables; /* to control the amount of add/sub variables events:
    dict with key {RESOURCE_NAME}#Time or {RESOURCE_NAME}#Value of dict with variables types == string */
@@ -45,14 +43,8 @@ void __TRACE_surf_init (void)
   link_latency = xbt_dict_new();
   platform_variables = xbt_dict_new();
   host_containers = xbt_dict_new();
-
-  //platform_variable_last_value = xbt_dict_new();
-  //platform_variable_last_time = xbt_dict_new();
-
   last_platform_variables =  xbt_dict_new();
-
   resource_variables = xbt_dict_new ();
-
   gtnets_src = xbt_dict_new ();
   gtnets_dst = xbt_dict_new ();
 }
@@ -433,4 +425,17 @@ void TRACE_msg_clean (void)
   }
 }
 
+void TRACE_surf_vivaldi_parse_host (char *host, double x, double y, double h)
+{
+  if (!IS_TRACING || !IS_TRACING_PLATFORM) return;
+
+  char valuestr[100];
+  snprintf (valuestr, 100, "%g", x);
+  pajeSetVariable (0, "vivaldi_x", host, valuestr);
+  snprintf (valuestr, 100, "%g", y);
+  pajeSetVariable (0, "vivaldi_y", host, valuestr);
+  snprintf (valuestr, 100, "%g", h);
+  pajeSetVariable (0, "vivaldi_h", host, valuestr);
+}
+
 #endif