X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e14aabeee188d0182d686681c2a5c5833cf699bf..7e3849b9b5738302961960026dec684bd7303053:/src/instr/instr_interface.c?ds=sidebyside diff --git a/src/instr/instr_interface.c b/src/instr/instr_interface.c index 0deeafe652..34d03af197 100644 --- a/src/instr/instr_interface.c +++ b/src/instr/instr_interface.c @@ -19,7 +19,7 @@ void TRACE_category(const char *category) void TRACE_category_with_color (const char *category, const char *color) { - if (!TRACE_is_active()) + if (!(TRACE_is_active() && category != NULL)) return; xbt_assert1 (instr_platform_traced(), @@ -72,7 +72,7 @@ void TRACE_declare_mark(const char *mark_type) return; DEBUG1("MARK,declare %s", mark_type); - pajeDefineEventType(mark_type, "0", mark_type); + getEventType(mark_type, NULL, getRootType()); } void TRACE_mark(const char *mark_type, const char *mark_value) @@ -83,7 +83,8 @@ void TRACE_mark(const char *mark_type, const char *mark_value) return; DEBUG2("MARK %s %s", mark_type, mark_value); - pajeNewEvent(MSG_get_clock(), mark_type, "0", mark_value); + type_t type = getEventType (mark_type, NULL, getRootContainer()->type); + new_pajeNewEvent (MSG_get_clock(), getRootContainer(), type, mark_value); } @@ -103,14 +104,14 @@ void TRACE_user_link_variable(double time, const char *resource, if (strcmp(what, "declare") == 0) { instr_new_user_link_variable_type (variable, NULL); } else{ - char *variable_id = instr_variable_type(variable, resource); - char *resource_id = instr_resource_type(resource); + container_t container = getContainerByName (resource); + type_t type = getVariableType (variable, NULL, container->type); if (strcmp(what, "set") == 0) { - pajeSetVariable(time, variable_id, resource_id, valuestr); + new_pajeSetVariable(time, container, type, value); } else if (strcmp(what, "add") == 0) { - pajeAddVariable(time, variable_id, resource_id, valuestr); + new_pajeAddVariable(time, container, type, value); } else if (strcmp(what, "sub") == 0) { - pajeSubVariable(time, variable_id, resource_id, valuestr); + new_pajeSubVariable(time, container, type, value); } } } @@ -131,17 +132,16 @@ void TRACE_user_host_variable(double time, const char *variable, instr_new_user_host_variable_type (variable, NULL); } else{ char *host_name = MSG_host_self()->name; - char *variable_id = instr_variable_type(variable, host_name); - char *resource_id = instr_resource_type(host_name); + container_t container = getContainerByName(host_name); + type_t type = getVariableType (variable, NULL, container->type); if (strcmp(what, "set") == 0) { - pajeSetVariable(time, variable_id, resource_id, valuestr); + new_pajeSetVariable(time, container, type, value); } else if (strcmp(what, "add") == 0) { - pajeAddVariable(time, variable_id, resource_id, valuestr); + new_pajeAddVariable(time, container, type, value); } else if (strcmp(what, "sub") == 0) { - pajeSubVariable(time, variable_id, resource_id, valuestr); + new_pajeSubVariable(time, container, type, value); } } } - #endif /* HAVE_TRACING */