X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b9063259210f578ffefeb7feb9590d1f9bea7361..90c25075db7fffb9a771de224159039029e20724:/src/instr/instr_surf.c diff --git a/src/instr/instr_surf.c b/src/instr/instr_surf.c index a79ecabb60..9faf3a89fc 100644 --- a/src/instr/instr_surf.c +++ b/src/instr/instr_surf.c @@ -24,22 +24,20 @@ void TRACE_surf_release(void) void TRACE_surf_host_set_power(double date, const char *resource, double power) { - if (!TRACE_is_enabled()) - return; - - container_t container = PJ_container_get(resource); - type_t type = PJ_type_get ("power", container->type); - new_pajeSetVariable(date, container, type, power); + if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) { + container_t container = PJ_container_get(resource); + type_t type = PJ_type_get ("power", container->type); + new_pajeSetVariable(date, container, type, power); + } } void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth) { - if (!TRACE_is_enabled()) - return; - - container_t container = PJ_container_get(resource); - type_t type = PJ_type_get ("bandwidth", container->type); - new_pajeSetVariable(date, container, type, bandwidth); + if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) { + container_t container = PJ_container_get(resource); + type_t type = PJ_type_get ("bandwidth", container->type); + new_pajeSetVariable(date, container, type, bandwidth); + } } /* to trace gtnets */