+ 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);
+}
+
+/** \ingroup TRACE_mark
+ * \brief Declare a new type for tracing mark.
+ *
+ * This function declares a new Paje event
+ * type in the trace file that can be used by
+ * simulators to declare application-level
+ * marks. This function is independent of
+ * which API is used in SimGrid.
+ *
+ * \param mark_type The name of the new type.
+ *
+ * \see TRACE_mark
+ */
+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);
+ PJ_type_event_new(mark_type, NULL, PJ_type_get_root());
+}
+
+/**
+ * \ingroup TRACE_mark
+ * \brief Create a new instance of a tracing mark type.
+ *
+ * This function creates a mark in the trace file. The
+ * first parameter had to be previously declared using
+ * #TRACE_declare_mark, the second is the identifier
+ * for this mark instance. We recommend that the
+ * mark_value is a unique value for the whole simulation.
+ * Nevertheless, this is not a strong requirement: the
+ * trace will be valid even if there are multiple mark
+ * identifiers for the same trace.
+ *
+ * \param mark_type The name of the type for which the new instance will belong.
+ * \param mark_value The name of the new instance mark.
+ *
+ * \see TRACE_declare_mark
+ */
+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 = PJ_type_get (mark_type, PJ_type_get_root());
+ if (type == NULL){
+ THROWF (tracing_error, 1, "mark_type with name (%s) not declared before", mark_type);