- if (!TRACE_is_active())
- return;
-
- xbt_assert (instr_platform_traced(),
- "%s must be called after environment creation", __FUNCTION__);
-
- char valuestr[100];
- snprintf(valuestr, 100, "%g", value);
-
- if (strcmp(what, "declare") == 0) {
- instr_new_user_host_variable_type (variable, NULL);
- } else{
- char *host_name = MSG_host_self()->name;
- container_t container = getContainerByName(host_name);
- type_t type = getVariableType (variable, NULL, container->type);
- if (strcmp(what, "set") == 0) {
- new_pajeSetVariable(time, container, type, value);
- } else if (strcmp(what, "add") == 0) {
- new_pajeAddVariable(time, container, type, value);
- } else if (strcmp(what, "sub") == 0) {
- new_pajeSubVariable(time, container, type, value);
- }
+ xbt_dynar_t route = global_routing->get_route (src, dst);
+ unsigned int i;
+ void *link;
+ xbt_dynar_foreach (route, i, link) {
+ char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
+ TRACE_user_variable (time, link_name, variable, father_type, value, what);