Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_platf_trace_cb
authorGabriel Corona <gabriel.corona@loria.fr>
Wed, 2 Dec 2015 10:34:05 +0000 (11:34 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Wed, 2 Dec 2015 10:34:05 +0000 (11:34 +0100)
src/surf/sg_platf.cpp
src/surf/surf_routing.cpp

index 77aa1d5..134f739 100644 (file)
@@ -27,8 +27,6 @@ xbt_dynar_t sg_platf_ASroute_cb_list = NULL; // of sg_platf_ASroute_cb_t
 xbt_dynar_t sg_platf_bypassRoute_cb_list = NULL; // of sg_platf_bypassRoute_cb_t
 xbt_dynar_t sg_platf_bypassASroute_cb_list = NULL; // of sg_platf_bypassASroute_cb_t
 
-xbt_dynar_t sg_platf_trace_cb_list = NULL;
-
 /* ***************************************** */
 /* TUTORIAL: New TAG                         */
 
@@ -56,8 +54,6 @@ void sg_platf_init(void) {
   sg_platf_bypassRoute_cb_list = xbt_dynar_new(sizeof(sg_platf_route_cb_t), NULL);
   sg_platf_bypassASroute_cb_list = xbt_dynar_new(sizeof(sg_platf_route_cb_t), NULL);
 
-  sg_platf_trace_cb_list = xbt_dynar_new(sizeof(sg_platf_trace_cb_t), NULL);
-
   /* ***************************************** */
   /* TUTORIAL: New TAG                         */
 
@@ -70,8 +66,6 @@ void sg_platf_exit(void) {
   xbt_dynar_free(&sg_platf_postparse_cb_list);
   xbt_dynar_free(&sg_platf_cluster_cb_list);
 
-  xbt_dynar_free(&sg_platf_trace_cb_list);
-
   xbt_dynar_free(&sg_platf_ASroute_cb_list);
   xbt_dynar_free(&sg_platf_bypassRoute_cb_list);
   xbt_dynar_free(&sg_platf_bypassASroute_cb_list);
@@ -322,13 +316,6 @@ void sg_platf_new_bypassASroute(sg_platf_route_cbarg_t bypassASroute) {
     fun(bypassASroute);
   }
 }
-void sg_platf_new_trace(sg_platf_trace_cbarg_t trace) {
-  unsigned int iterator;
-  sg_platf_trace_cb_t fun;
-  xbt_dynar_foreach(sg_platf_trace_cb_list, iterator, fun) {
-    fun(trace);
-  }
-}
 
 void sg_platf_new_process(sg_platf_process_cbarg_t process)
 {
@@ -511,9 +498,6 @@ void sg_platf_bypassRoute_add_cb(sg_platf_route_cb_t fct) {
 void sg_platf_bypassASroute_add_cb(sg_platf_route_cb_t fct) {
   xbt_dynar_push(sg_platf_bypassASroute_cb_list, &fct);
 }
-void sg_platf_trace_add_cb(sg_platf_trace_cb_t fct) {
-  xbt_dynar_push(sg_platf_trace_cb_list, &fct);
-}
 void sg_platf_rng_stream_init(unsigned long seed[6]) {
   RngStream_SetPackageSeed(seed);
   sg_platf_rng_stream = RngStream_CreateStream(NULL);
index c017ff4..b41f4aa 100644 (file)
@@ -228,7 +228,7 @@ static void parse_E_bypassASroute(sg_platf_route_cbarg_t ASroute)
   current_routing->parseBypassroute(ASroute);
 }
 
-static void routing_parse_trace(sg_platf_trace_cbarg_t trace)
+void sg_platf_new_trace(sg_platf_trace_cbarg_t trace)
 {
   tmgr_trace_t tmgr_trace;
   if (!trace->file || strcmp(trace->file, "") != 0) {
@@ -1247,8 +1247,6 @@ void routing_register_callbacks()
   sg_platf_postparse_add_cb(routing_parse_postparse);
   sg_platf_postparse_add_cb(check_disk_attachment);
 
-  sg_platf_trace_add_cb(routing_parse_trace);
-
   instr_routing_define_callbacks();
 }