X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4a8a9aee8b2d176fa6b207b030197c91a1030630..9d5492041a839402b7c142c08ebdc8df6e9d5c24:/src/instr/instr_interface.c diff --git a/src/instr/instr_interface.c b/src/instr/instr_interface.c index e49403ad3a..fc03a78247 100644 --- a/src/instr/instr_interface.c +++ b/src/instr/instr_interface.c @@ -162,25 +162,17 @@ static void instr_user_srcdst_variable(double time, } } -const char *TRACE_node_name (xbt_node_t node) -{ - void *data = xbt_graph_node_get_data(node); - char *str = (char*)data; - return str; -} - -xbt_graph_t TRACE_platform_graph (void) -{ - if (!TRACE_is_enabled()) return NULL; - return instr_routing_platform_graph (); -} - -void TRACE_platform_graph_export_graphviz (xbt_graph_t g, const char *filename) +int TRACE_platform_graph_export_graphviz (const char *filename) { + /* returns 1 if successful, 0 otherwise */ + if (!TRACE_is_enabled()) return 0; + xbt_graph_t g = instr_routing_platform_graph(); + if (g == NULL) return 0; instr_routing_platform_graph_export_graphviz (g, filename); + xbt_graph_free_graph (g, xbt_free, xbt_free, NULL); + return 1; } - /* * Derived functions that use instr_user_variable and TRACE_user_srcdst_variable. * They were previously defined as pre-processors directives, but were transformed