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
[trace] faster method to dump when unconditional dump to trace file is possible
[simgrid.git]
/
src
/
instr
/
instr_interface.c
diff --git
a/src/instr/instr_interface.c
b/src/instr/instr_interface.c
index
0deeafe
..
34d03af
100644
(file)
--- a/
src/instr/instr_interface.c
+++ b/
src/instr/instr_interface.c
@@
-19,7
+19,7
@@
void TRACE_category(const char *category)
void TRACE_category_with_color (const char *category, const char *color)
{
void TRACE_category_with_color (const char *category, const char *color)
{
- if (!
TRACE_is_active(
))
+ if (!
(TRACE_is_active() && category != NULL
))
return;
xbt_assert1 (instr_platform_traced(),
return;
xbt_assert1 (instr_platform_traced(),
@@
-72,7
+72,7
@@
void TRACE_declare_mark(const char *mark_type)
return;
DEBUG1("MARK,declare %s", mark_type);
return;
DEBUG1("MARK,declare %s", mark_type);
-
pajeDefineEventType(mark_type, "0", mark_type
);
+
getEventType(mark_type, NULL, getRootType()
);
}
void TRACE_mark(const char *mark_type, const char *mark_value)
}
void TRACE_mark(const char *mark_type, const char *mark_value)
@@
-83,7
+83,8
@@
void TRACE_mark(const char *mark_type, const char *mark_value)
return;
DEBUG2("MARK %s %s", mark_type, mark_value);
return;
DEBUG2("MARK %s %s", mark_type, mark_value);
- pajeNewEvent(MSG_get_clock(), mark_type, "0", mark_value);
+ type_t type = getEventType (mark_type, NULL, getRootContainer()->type);
+ new_pajeNewEvent (MSG_get_clock(), getRootContainer(), type, mark_value);
}
}
@@
-103,14
+104,14
@@
void TRACE_user_link_variable(double time, const char *resource,
if (strcmp(what, "declare") == 0) {
instr_new_user_link_variable_type (variable, NULL);
} else{
if (strcmp(what, "declare") == 0) {
instr_new_user_link_variable_type (variable, NULL);
} else{
- c
har *variable_id = instr_variable_type(variable,
resource);
-
char *resource_id = instr_resource_type(resourc
e);
+ c
ontainer_t container = getContainerByName (
resource);
+
type_t type = getVariableType (variable, NULL, container->typ
e);
if (strcmp(what, "set") == 0) {
if (strcmp(what, "set") == 0) {
-
pajeSetVariable(time, variable_id, resource_id, valuestr
);
+
new_pajeSetVariable(time, container, type, value
);
} else if (strcmp(what, "add") == 0) {
} else if (strcmp(what, "add") == 0) {
-
pajeAddVariable(time, variable_id, resource_id, valuestr
);
+
new_pajeAddVariable(time, container, type, value
);
} else if (strcmp(what, "sub") == 0) {
} else if (strcmp(what, "sub") == 0) {
-
pajeSubVariable(time, variable_id, resource_id, valuestr
);
+
new_pajeSubVariable(time, container, type, value
);
}
}
}
}
}
}
@@
-131,17
+132,16
@@
void TRACE_user_host_variable(double time, const char *variable,
instr_new_user_host_variable_type (variable, NULL);
} else{
char *host_name = MSG_host_self()->name;
instr_new_user_host_variable_type (variable, NULL);
} else{
char *host_name = MSG_host_self()->name;
- c
har *variable_id = instr_variable_type(variable,
host_name);
-
char *resource_id = instr_resource_type(host_nam
e);
+ c
ontainer_t container = getContainerByName(
host_name);
+
type_t type = getVariableType (variable, NULL, container->typ
e);
if (strcmp(what, "set") == 0) {
if (strcmp(what, "set") == 0) {
-
pajeSetVariable(time, variable_id, resource_id, valuestr
);
+
new_pajeSetVariable(time, container, type, value
);
} else if (strcmp(what, "add") == 0) {
} else if (strcmp(what, "add") == 0) {
-
pajeAddVariable(time, variable_id, resource_id, valuestr
);
+
new_pajeAddVariable(time, container, type, value
);
} else if (strcmp(what, "sub") == 0) {
} else if (strcmp(what, "sub") == 0) {
-
pajeSubVariable(time, variable_id, resource_id, valuestr
);
+
new_pajeSubVariable(time, container, type, value
);
}
}
}
}
}
}
-
#endif /* HAVE_TRACING */
#endif /* HAVE_TRACING */