//check if category is already created
char *created = xbt_dict_get_or_null(created_categories, category);
if (created) return;
- xbt_dict_set (created_categories, category, xbt_strdup("1"), xbt_free);
+ xbt_dict_set (created_categories, category, xbt_strdup("1"), NULL);
//define final_color
char final_color[INSTR_DEFAULT_STR_SIZE];
const char *variable,
const char *father_type,
double value,
- InstrUserVariable what)
+ InstrUserVariable what,
+ const char *color)
{
/* safe switch */
if (!TRACE_is_enabled()) return;
switch (what){
case INSTR_US_DECLARE:
- instr_new_user_variable_type (father_type, variable, NULL);
+ instr_new_user_variable_type (father_type, variable, color);
break;
case INSTR_US_SET:
{
double value,
InstrUserVariable what)
{
- xbt_dynar_t route = global_routing->get_route (src, dst);
+ xbt_dynar_t route=NULL;
+ routing_get_route_and_latency (src, dst, &route,NULL);
unsigned int i;
void *link;
xbt_dynar_foreach (route, i, link) {
char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
- instr_user_variable (time, link_name, variable, father_type, value, what);
+ instr_user_variable (time, link_name, variable, father_type, value, what, NULL);
}
}
/* for host variables */
void TRACE_host_variable_declare (const char *var)
{
- instr_user_variable(0, NULL, var, "HOST", 0, INSTR_US_DECLARE);
+ instr_user_variable(0, NULL, var, "HOST", 0, INSTR_US_DECLARE, NULL);
+}
+
+void TRACE_host_variable_declare_with_color (const char *var, const char *color)
+{
+ instr_user_variable(0, NULL, var, "HOST", 0, INSTR_US_DECLARE, color);
}
void TRACE_host_variable_set (const char *host, const char *variable, double value)
void TRACE_host_variable_set_with_time (double time, const char *host, const char *variable, double value)
{
- instr_user_variable(time, host, variable, "HOST", value, INSTR_US_SET);
+ instr_user_variable(time, host, variable, "HOST", value, INSTR_US_SET, NULL);
}
void TRACE_host_variable_add_with_time (double time, const char *host, const char *variable, double value)
{
- instr_user_variable(time, host, variable, "HOST", value, INSTR_US_ADD);
+ instr_user_variable(time, host, variable, "HOST", value, INSTR_US_ADD, NULL);
}
void TRACE_host_variable_sub_with_time (double time, const char *host, const char *variable, double value)
{
- instr_user_variable(time, host, variable, "HOST", value, INSTR_US_SUB);
+ instr_user_variable(time, host, variable, "HOST", value, INSTR_US_SUB, NULL);
}
/* for link variables */
void TRACE_link_variable_declare (const char *var)
{
- instr_user_variable (0, NULL, var, "LINK", 0, INSTR_US_DECLARE);
+ instr_user_variable (0, NULL, var, "LINK", 0, INSTR_US_DECLARE, NULL);
+}
+
+void TRACE_link_variable_declare_with_color (const char *var, const char *color)
+{
+ instr_user_variable (0, NULL, var, "LINK", 0, INSTR_US_DECLARE, color);
}
void TRACE_link_variable_set (const char *link, const char *variable, double value)
void TRACE_link_variable_set_with_time (double time, const char *link, const char *variable, double value)
{
- instr_user_variable (time, link, variable, "LINK", value, INSTR_US_SET);
+ instr_user_variable (time, link, variable, "LINK", value, INSTR_US_SET, NULL);
}
void TRACE_link_variable_add_with_time (double time, const char *link, const char *variable, double value)
{
- instr_user_variable (time, link, variable, "LINK", value, INSTR_US_ADD);
+ instr_user_variable (time, link, variable, "LINK", value, INSTR_US_ADD, NULL);
}
void TRACE_link_variable_sub_with_time (double time, const char *link, const char *variable, double value)
{
- instr_user_variable (time, link, variable, "LINK", value, INSTR_US_SUB);
+ instr_user_variable (time, link, variable, "LINK", value, INSTR_US_SUB, NULL);
}
/* for link variables, but with src and dst used for get_route */