A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace surf by surf++ and make it compile
[simgrid.git]
/
src
/
instr
/
instr_interface.c
diff --git
a/src/instr/instr_interface.c
b/src/instr/instr_interface.c
index
ae16b2e
..
aec0980
100644
(file)
--- a/
src/instr/instr_interface.c
+++ b/
src/instr/instr_interface.c
@@
-8,7
+8,10
@@
#ifdef HAVE_TRACING
#include "instr/instr_private.h"
#ifdef HAVE_TRACING
#include "instr/instr_private.h"
-#include "surf/network_private.h"
+#include "surf/surf.h"
+#include "surf/surf_private.h"
+
+//FIXME:#include "surf/network_private.h"
typedef enum {
INSTR_US_DECLARE,
typedef enum {
INSTR_US_DECLARE,
@@
-111,7
+114,7
@@
void TRACE_category_with_color (const char *category, const char *color)
snprintf (final_color, INSTR_DEFAULT_STR_SIZE, "%s", color);
}
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);
//define the type of this category on top of hosts and links
instr_new_variable_type (category, final_color);
@@
-374,7
+377,7
@@
static void instr_user_srcdst_variable(double time,
unsigned int i;
void *link;
xbt_dynar_foreach (route, i, link) {
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);
}
}
instr_user_variable (time, link_name, variable, father_type, value, what, NULL, user_link_variables);
}
}
@@
-423,7
+426,7
@@
int TRACE_platform_graph_export_graphviz (const char *filename)
*/
void TRACE_vm_variable_declare (const char *variable)
{
*/
void TRACE_vm_variable_declare (const char *variable)
{
- instr_user_variable(0, NULL, variable, "VM", 0, INSTR_US_DECLARE, NULL, user_vm_variables);
+ instr_user_variable(0, NULL, variable, "
MSG_
VM", 0, INSTR_US_DECLARE, NULL, user_vm_variables);
}
/** \ingroup TRACE_user_variables
}
/** \ingroup TRACE_user_variables
@@
-440,7
+443,7
@@
void TRACE_vm_variable_declare (const char *variable)
*/
void TRACE_vm_variable_declare_with_color (const char *variable, const char *color)
{
*/
void TRACE_vm_variable_declare_with_color (const char *variable, const char *color)
{
-
instr_user_variable(0, NULL, variable, "HOST
", 0, INSTR_US_DECLARE, color, user_vm_variables);
+
instr_user_variable(0, NULL, variable, "MSG_VM
", 0, INSTR_US_DECLARE, color, user_vm_variables);
}
/** \ingroup TRACE_user_variables
}
/** \ingroup TRACE_user_variables
@@
-454,6
+457,7
@@
void TRACE_vm_variable_declare_with_color (const char *variable, const char *col
*/
void TRACE_vm_variable_set (const char *vm, const char *variable, double value)
{
*/
void TRACE_vm_variable_set (const char *vm, const char *variable, double value)
{
+
TRACE_vm_variable_set_with_time (MSG_get_clock(), vm, variable, value);
}
TRACE_vm_variable_set_with_time (MSG_get_clock(), vm, variable, value);
}
@@
-504,7
+508,7
@@
void TRACE_vm_variable_sub (const char *vm, const char *variable, double value)
*/
void TRACE_vm_variable_set_with_time (double time, const char *vm, const char *variable, double value)
{
*/
void TRACE_vm_variable_set_with_time (double time, const char *vm, const char *variable, double value)
{
- instr_user_variable(time, vm, variable, "VM", value, INSTR_US_SET, NULL, user_vm_variables);
+ instr_user_variable(time, vm, variable, "
MSG_
VM", value, INSTR_US_SET, NULL, user_vm_variables);
}
/** \ingroup TRACE_user_variables
}
/** \ingroup TRACE_user_variables
@@
-526,7
+530,7
@@
void TRACE_vm_variable_set_with_time (double time, const char *vm, const char *v
*/
void TRACE_vm_variable_add_with_time (double time, const char *vm, const char *variable, double value)
{
*/
void TRACE_vm_variable_add_with_time (double time, const char *vm, const char *variable, double value)
{
- instr_user_variable(time, vm, variable, "VM", value, INSTR_US_ADD, NULL, user_vm_variables);
+ instr_user_variable(time, vm, variable, "
MSG_
VM", value, INSTR_US_ADD, NULL, user_vm_variables);
}
/** \ingroup TRACE_user_variables
}
/** \ingroup TRACE_user_variables
@@
-548,7
+552,7
@@
void TRACE_vm_variable_add_with_time (double time, const char *vm, const char *v
*/
void TRACE_vm_variable_sub_with_time (double time, const char *vm, const char *variable, double value)
{
*/
void TRACE_vm_variable_sub_with_time (double time, const char *vm, const char *variable, double value)
{
- instr_user_variable(time, vm, variable, "VM", value, INSTR_US_SUB, NULL, user_vm_variables);
+ instr_user_variable(time, vm, variable, "
MSG_
VM", value, INSTR_US_SUB, NULL, user_vm_variables);
}
/** \ingroup TRACE_user_variables
}
/** \ingroup TRACE_user_variables
@@
-1145,4
+1149,22
@@
xbt_dynar_t TRACE_get_edge_types (void)
return instr_dict_to_dynar (trivaEdgeTypes);
}
return instr_dict_to_dynar (trivaEdgeTypes);
}
+/** \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();
+}
+
#endif /* HAVE_TRACING */
#endif /* HAVE_TRACING */