X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8a80a7488d5a9c1b57d287f939a310ee63c27583..272ccad1b68b6d9c17069f3c934886925bb15b5d:/src/instr/jedule/jedule_output.c diff --git a/src/instr/jedule/jedule_output.c b/src/instr/jedule/jedule_output.c index 7cb7af073b..25682b25ec 100644 --- a/src/instr/jedule/jedule_output.c +++ b/src/instr/jedule/jedule_output.c @@ -38,36 +38,36 @@ static void get_hierarchy_list(xbt_dynar_t hier_list, jed_simgrid_container_t co static void get_hierarchy_list(xbt_dynar_t hier_list, jed_simgrid_container_t container) { - xbt_assert( container != NULL ); + xbt_assert( container != NULL ); - if( container->parent != NULL ) { + if( container->parent != NULL ) { - if( container->parent->container_children == NULL ) { - // we are in the last level - get_hierarchy_list(hier_list, container->parent); + if( container->parent->container_children == NULL ) { + // we are in the last level + get_hierarchy_list(hier_list, container->parent); - } else { - unsigned int i; - int child_nb = -1; - jed_simgrid_container_t child_container; + } else { + unsigned int i; + int child_nb = -1; + jed_simgrid_container_t child_container; - xbt_dynar_foreach(container->parent->container_children, i, child_container) { - if( child_container == container ) { - child_nb = i; - break; - } - } + xbt_dynar_foreach(container->parent->container_children, i, child_container) { + if( child_container == container ) { + child_nb = i; + break; + } + } - xbt_assert( child_nb > - 1); + xbt_assert( child_nb > - 1); - xbt_dynar_insert_at(hier_list, 0, &child_nb); + xbt_dynar_insert_at(hier_list, 0, &child_nb); - get_hierarchy_list(hier_list, container->parent); - } - } else { - int top_level = 0; - xbt_dynar_insert_at(hier_list, 0, &top_level); - } + get_hierarchy_list(hier_list, container->parent); + } + } else { + int top_level = 0; + xbt_dynar_insert_at(hier_list, 0, &top_level); + } } @@ -97,158 +97,158 @@ static void get_hierarchy_string(jed_simgrid_container_t container, char *outbuf } static void print_key_value_dict(xbt_dict_t key_value_dict) { - xbt_dict_cursor_t cursor=NULL; - char *key,*data; - - if( key_value_dict != NULL ) { - xbt_dict_foreach(key_value_dict,cursor,key,data) { - fprintf(jed_file, "\n",key,data); - } - } + xbt_dict_cursor_t cursor=NULL; + char *key,*data; + + if( key_value_dict != NULL ) { + xbt_dict_foreach(key_value_dict,cursor,key,data) { + fprintf(jed_file, "\n",key,data); + } + } } static void print_container(jed_simgrid_container_t container) { - unsigned int i; - jed_simgrid_container_t child_container; - - xbt_assert( container != NULL ); - - fprintf(jed_file, "\n", container->name); - if( container->container_children != NULL ) { - xbt_dynar_foreach(container->container_children, i, child_container) { - print_container(child_container); - } - } else { - print_resources(container); - } - fprintf(jed_file, "\n"); + unsigned int i; + jed_simgrid_container_t child_container; + + xbt_assert( container != NULL ); + + fprintf(jed_file, "\n", container->name); + if( container->container_children != NULL ) { + xbt_dynar_foreach(container->container_children, i, child_container) { + print_container(child_container); + } + } else { + print_resources(container); + } + fprintf(jed_file, "\n"); } static void print_resources(jed_simgrid_container_t resource_parent) { - int res_nb; - unsigned int i; - char *res_name; + int res_nb; + unsigned int i; + char *res_name; char resid[1024]; - xbt_assert( resource_parent->resource_list != NULL ); + xbt_assert( resource_parent->resource_list != NULL ); - res_nb = xbt_dynar_length(resource_parent->resource_list); + res_nb = xbt_dynar_length(resource_parent->resource_list); get_hierarchy_string(resource_parent, resid); - fprintf(jed_file, "resource_list, i, res_name) { - fprintf(jed_file, "%s", res_name); - if( i != res_nb-1 ) { - fprintf(jed_file, "|"); - } - } - fprintf(jed_file, "\" />\n"); + fprintf(jed_file, "resource_list, i, res_name) { + fprintf(jed_file, "%s", res_name); + if( i != res_nb-1 ) { + fprintf(jed_file, "|"); + } + } + fprintf(jed_file, "\" />\n"); } static void print_platform(jed_simgrid_container_t root_container) { - fprintf(jed_file, "\n"); - print_container(root_container); - fprintf(jed_file, "\n"); + fprintf(jed_file, "\n"); + print_container(root_container); + fprintf(jed_file, "\n"); } static void print_event(jed_event_t event) { - unsigned int i; - jed_res_subset_t subset; + unsigned int i; + jed_res_subset_t subset; - xbt_assert( event != NULL ); - xbt_assert( event->resource_subsets != NULL ); + xbt_assert( event != NULL ); + xbt_assert( event->resource_subsets != NULL ); - fprintf(jed_file, "\n"); + fprintf(jed_file, "\n"); - fprintf(jed_file, "\n", event->name); - fprintf(jed_file, "\n", event->start_time); - fprintf(jed_file, "\n", event->end_time); - fprintf(jed_file, "\n", event->type); + fprintf(jed_file, "\n", event->name); + fprintf(jed_file, "\n", event->start_time); + fprintf(jed_file, "\n", event->end_time); + fprintf(jed_file, "\n", event->type); - fprintf(jed_file, "\n"); + fprintf(jed_file, "\n"); - xbt_dynar_foreach(event->resource_subsets, i, subset) { + xbt_dynar_foreach(event->resource_subsets, i, subset) { - int start = subset->start_idx; - int end = subset->start_idx + subset->nres - 1; + int start = subset->start_idx; + int end = subset->start_idx + subset->nres - 1; char resid[1024]; get_hierarchy_string(subset->parent, resid); - fprintf(jed_file, "