+xbt_dict_t created_categories = NULL;
+xbt_dict_t declared_marks = NULL;
+xbt_dict_t user_host_variables = NULL;
+xbt_dict_t user_link_variables = NULL;
+extern xbt_dict_t trivaNodeTypes;
+extern xbt_dict_t trivaEdgeTypes;
+
+static xbt_dynar_t instr_dict_to_dynar (xbt_dict_t filter)
+{
+ if (!TRACE_is_enabled()) return NULL;
+ if (!TRACE_needs_platform()) return NULL;
+
+ xbt_dynar_t ret = xbt_dynar_new (sizeof(char*), &xbt_free_ref);
+ xbt_dict_cursor_t cursor = NULL;
+ char *name, *value;
+ xbt_dict_foreach(filter, cursor, name, value) {
+ xbt_dynar_push_as (ret, char*, xbt_strdup(name));
+ }
+ return ret;
+}
+
+/** \ingroup TRACE_category
+ * \brief Declare a new category with a random color.
+ *
+ * This function should be used to define a user category. The
+ * category can be used to differentiate the tasks that are created
+ * during the simulation (for example, tasks from server1, server2,
+ * or request tasks, computation tasks, communication tasks). All
+ * resource utilization (host power and link bandwidth) will be
+ * classified according to the task category. Tasks that do not
+ * belong to a category are not traced. The color for the category
+ * that is being declared is random. This function has no effect
+ * if a category with the same name has been already declared.
+ *
+ * See \ref tracing_tracing for details on how to trace
+ * the (categorized) resource utilization.
+ *
+ * \param category The name of the new tracing category to be created.
+ *
+ * \see TRACE_category_with_color, MSG_task_set_category, SD_task_set_category
+ */