From: Jonathan Rouzaud-Cornabas Date: Thu, 9 Aug 2012 16:01:43 +0000 (+0200) Subject: Fix VM Trace bugs X-Git-Tag: v3_9_rc1~98 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d9e1bca6c82cd2df3c51534fb421b52400a47a07 Fix VM Trace bugs --- diff --git a/include/instr/instr.h b/include/instr/instr.h index 654112d5c2..84a43430ba 100644 --- a/include/instr/instr.h +++ b/include/instr/instr.h @@ -107,6 +107,16 @@ XBT_PUBLIC(xbt_dynar_t) TRACE_get_edge_types (void); #define TRACE_platform_graph_export_graphviz(filename) +#define TRACE_vm_variable_declare(var) +#define TRACE_vm_variable_declare_with_color(var,color) +#define TRACE_vm_variable_set(vm,var,value) +#define TRACE_vm_variable_add(vm,var,value) +#define TRACE_vm_variable_sub(vm,var,value) +#define TRACE_vm_variable_set_with_time(time,vm,var,value) +#define TRACE_vm_variable_add_with_time(time,vm,var,value) +#define TRACE_vm_variable_sub_with_time(time,vm,var,value) +#define TRACE_get_vm_variables() + #define TRACE_host_variable_declare(var) #define TRACE_host_variable_declare_with_color(var,color) #define TRACE_host_variable_set(host,var,value) diff --git a/src/instr/instr_interface.c b/src/instr/instr_interface.c index ae16b2e042..785529168b 100644 --- a/src/instr/instr_interface.c +++ b/src/instr/instr_interface.c @@ -423,7 +423,7 @@ int TRACE_platform_graph_export_graphviz (const char *filename) */ 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 @@ -440,7 +440,7 @@ void TRACE_vm_variable_declare (const char *variable) */ 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 @@ -454,6 +454,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) { + TRACE_vm_variable_set_with_time (MSG_get_clock(), vm, variable, value); } @@ -504,7 +505,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) { - 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 @@ -526,7 +527,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) { - 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 @@ -548,7 +549,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) { - 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 diff --git a/src/instr/instr_routing.c b/src/instr/instr_routing.c index 274b93b564..d8649afbd5 100644 --- a/src/instr/instr_routing.c +++ b/src/instr/instr_routing.c @@ -376,7 +376,7 @@ static void recursiveNewVariableType (const char *new_typename, const char *colo snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename); PJ_type_variable_new (tnstr, color, root); } - if (!strcmp (root->name, "VM")){ + if (!strcmp (root->name, "MSG_VM")){ char tnstr[INSTR_DEFAULT_STR_SIZE]; snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename); PJ_type_variable_new (tnstr, color, root);