-/* Copyright (c) 2010. The SimGrid Team.
+/* Copyright (c) 2010-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
+ * under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid_config.h"
-#ifdef HAVE_TRACING
#include "instr/instr_private.h"
-#include "surf/network_private.h"
+#include "surf/surf.h"
+#include "surf/surf_private.h"
typedef enum {
INSTR_US_DECLARE,
snprintf (final_color, INSTR_DEFAULT_STR_SIZE, "%s", color);
}
- XBT_DEBUG("CAT,declare %s, %s", category, final_color);
+ XBT_DEBUG("CAT,declare %s, \"%s\" \"%s\"", category, color, final_color);
//define the type of this category on top of hosts and links
instr_new_variable_type (category, final_color);
unsigned int i;
void *link;
xbt_dynar_foreach (route, i, link) {
- char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
+ char *link_name = (char*)surf_resource_name(link);
instr_user_variable (time, link_name, variable, father_type, value, what, NULL, user_link_variables);
}
}
xbt_graph_t g = instr_routing_platform_graph();
if (g == NULL) return 0;
instr_routing_platform_graph_export_graphviz (g, filename);
- xbt_graph_free_graph (g, xbt_free, xbt_free, NULL);
+ xbt_graph_free_graph(g, xbt_free_f, xbt_free_f, NULL);
return 1;
}
return instr_dict_to_dynar (trivaEdgeTypes);
}
-#endif /* HAVE_TRACING */
+/** \ingroup TRACE_API
+ * \brief Pauses all tracing activities.
+ * \see TRACE_resume
+ */
+void TRACE_pause (void)
+{
+ instr_pause_tracing();
+}
+
+/** \ingroup TRACE_API
+ * \brief Resumes all tracing activities.
+ * \see TRACE_pause
+ */
+void TRACE_resume (void)
+{
+ instr_resume_tracing();
+}