+ XBT_DEBUG("CAT,declare %s, %s", category, final_color);
+
+ //define the type of this category on top of hosts and links
+ instr_new_variable_type (category, final_color);
+}
+
+void TRACE_declare_mark(const char *mark_type)
+{
+ /* safe switch */
+ if (!TRACE_is_enabled()) return;
+
+ if (!mark_type) return;
+
+ XBT_DEBUG("MARK,declare %s", mark_type);
+ getEventType(mark_type, NULL, getRootType());
+}
+
+void TRACE_mark(const char *mark_type, const char *mark_value)
+{
+ /* safe switch */
+ if (!TRACE_is_enabled()) return;
+
+ if (!mark_type || !mark_value) return;
+
+ XBT_DEBUG("MARK %s %s", mark_type, mark_value);
+ type_t type = getEventType (mark_type, NULL, getRootContainer()->type);
+ val_t value = getValue (mark_value, NULL, type);
+ new_pajeNewEvent (MSG_get_clock(), getRootContainer(), type, value);
+}
+
+static void instr_user_variable(double time,
+ const char *resource,
+ const char *variable,
+ const char *father_type,
+ double value,
+ InstrUserVariable what)
+{
+ /* safe switch */
+ if (!TRACE_is_enabled()) return;
+
+ /* if platform is not traced, we can't deal user variables */
+ if (!TRACE_needs_platform()) return;
+
+ char valuestr[100];
+ snprintf(valuestr, 100, "%g", value);
+
+ switch (what){
+ case INSTR_US_DECLARE:
+ instr_new_user_variable_type (father_type, variable, NULL);
+ break;
+ case INSTR_US_SET:
+ {
+ container_t container = getContainerByName(resource);
+ type_t type = getVariableType (variable, NULL, container->type);
+ new_pajeSetVariable(time, container, type, value);
+ break;