X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2e9105988280d1e88b5b496d6e2eed4c8d541883..9b8c19c2b3028ebeef9f76f159af56acd5739c6d:/src/surf/instr_routing.c diff --git a/src/surf/instr_routing.c b/src/surf/instr_routing.c index 285a03b1bd..63b21007a9 100644 --- a/src/surf/instr_routing.c +++ b/src/surf/instr_routing.c @@ -5,7 +5,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "instr/instr_private.h" -#include "mc/mc.h" #ifdef HAVE_TRACING #include "surf/surf_private.h" @@ -14,8 +13,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy"); -extern xbt_dict_t defined_types; /* from instr_interface.c */ - static int platform_created = 0; /* indicate whether the platform file has been traced */ static xbt_dynar_t currentContainer = NULL; /* push and pop, used only in creation */ @@ -119,9 +116,6 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter) //create the link static long long counter = 0; - if(MC_is_active()) - MC_ignore_data_bss(&counter, sizeof(counter)); - char key[INSTR_DEFAULT_STR_SIZE]; snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", counter++); new_pajeStartLink(SIMIX_get_clock(), father, link_type, src, "topology", key); @@ -130,22 +124,10 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter) XBT_DEBUG (" linkContainers %s <-> %s", src->name, dst->name); } -static int graph_extraction_filter_out (container_t c1, container_t c2) -{ - if (c1->kind == INSTR_LINK || - c1->kind == INSTR_SMPI || - c1->kind == INSTR_MSG_PROCESS || - c1->kind == INSTR_MSG_TASK || - (c2 && strcmp (c1->name, c2->name) == 0)) - return 1; - else - return 0; -} - static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t filter) { if (!TRACE_platform_topology()){ - XBT_DEBUG("Graph extracing disable by user."); + XBT_DEBUG("Graph extraction disabled by user."); return; } XBT_DEBUG ("Graph extraction for routing_component = %s", rc->name); @@ -161,7 +143,7 @@ static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t } { - xbt_graph_t graph = xbt_graph_new_graph (0, NULL); + xbt_graph_t graph = xbt_graph_new_graph (0, NULL); xbt_dict_t nodes = xbt_dict_new_homogeneous(NULL); xbt_dict_t edges = xbt_dict_new_homogeneous(NULL); xbt_edge_t edge = NULL; @@ -177,7 +159,6 @@ static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t xbt_dict_free (&edges); xbt_graph_free_graph(graph,xbt_free, xbt_free, NULL); } - } /* @@ -250,7 +231,7 @@ static void instr_routing_parse_start_link (sg_platf_link_cbarg_t link) container_t new = PJ_container_new (link_name, INSTR_LINK, father); - if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()){ + if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_link())) { type_t bandwidth = PJ_type_get_or_null ("bandwidth", new->type); if (bandwidth == NULL){ bandwidth = PJ_type_variable_new ("bandwidth", NULL, new->type); @@ -278,12 +259,15 @@ static void instr_routing_parse_start_host (sg_platf_host_cbarg_t host) container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1); container_t new = PJ_container_new (host->id, INSTR_HOST, father); - if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) { + if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (! TRACE_disable_power())) { type_t power = PJ_type_get_or_null ("power", new->type); if (power == NULL){ power = PJ_type_variable_new ("power", NULL, new->type); } - new_pajeSetVariable (0, new, power, host->power_peak); + + double current_power_state; + xbt_dynar_get_cpy(host->power_peak, host->pstate, ¤t_power_state); + new_pajeSetVariable (0, new, power, current_power_state); } if (TRACE_uncategorized()){ type_t power_used = PJ_type_get_or_null ("power_used", new->type);