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
fix tracing tests
[simgrid.git]
/
src
/
instr
/
instr_paje_types.cpp
diff --git
a/src/instr/instr_paje_types.cpp
b/src/instr/instr_paje_types.cpp
index
9fd1dfe
..
c93da96
100644
(file)
--- a/
src/instr/instr_paje_types.cpp
+++ b/
src/instr/instr_paje_types.cpp
@@
-10,10
+10,6
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_types, instr, "Paje tracing event sy
static type_t rootType = nullptr; /* the root type */
static type_t rootType = nullptr; /* the root type */
-void PJ_type_alloc ()
-{
-}
-
void PJ_type_release ()
{
rootType = nullptr;
void PJ_type_release ()
{
rootType = nullptr;
@@
-30,7
+26,7
@@
static type_t newType (const char *typeNameBuff, const char *key, const char *co
THROWF(tracing_error, 0, "can't create a new type with name or key equal nullptr");
}
THROWF(tracing_error, 0, "can't create a new type with name or key equal nullptr");
}
- type_t ret = xbt_new0(s_type
_t
, 1);
+ type_t ret = xbt_new0(s_type, 1);
ret->name = xbt_strdup (typeNameBuff);
ret->father = father;
ret->kind = kind;
ret->name = xbt_strdup (typeNameBuff);
ret->father = father;
ret->kind = kind;
@@
-51,11
+47,12
@@
static type_t newType (const char *typeNameBuff, const char *key, const char *co
void PJ_type_free (type_t type)
{
void PJ_type_free (type_t type)
{
- val
_t value
;
+ val
ue* val
;
char *value_name;
xbt_dict_cursor_t cursor = nullptr;
char *value_name;
xbt_dict_cursor_t cursor = nullptr;
- xbt_dict_foreach(type->values, cursor, value_name, value) {
- PJ_value_free (value);
+ xbt_dict_foreach (type->values, cursor, value_name, val) {
+ XBT_DEBUG("free value %s, child of %s", val->name, val->father->name);
+ xbt_free(val);
}
xbt_dict_free (&type->values);
xbt_free (type->name);
}
xbt_dict_free (&type->values);
xbt_free (type->name);
@@
-66,7
+63,7
@@
void PJ_type_free (type_t type)
type = nullptr;
}
type = nullptr;
}
-
static
void recursiveDestroyType (type_t type)
+void recursiveDestroyType (type_t type)
{
XBT_DEBUG("recursiveDestroyType %s", type->name);
xbt_dict_cursor_t cursor = nullptr;
{
XBT_DEBUG("recursiveDestroyType %s", type->name);
xbt_dict_cursor_t cursor = nullptr;
@@
-78,12
+75,6
@@
static void recursiveDestroyType (type_t type)
PJ_type_free(type);
}
PJ_type_free(type);
}
-void PJ_type_free_all ()
-{
- recursiveDestroyType (PJ_type_get_root());
- rootType = nullptr;
-}
-
type_t PJ_type_get (const char *name, type_t father)
{
type_t ret = PJ_type_get_or_null (name, father);
type_t PJ_type_get (const char *name, type_t father)
{
type_t ret = PJ_type_get_or_null (name, father);
@@
-121,14
+112,10
@@
type_t PJ_type_container_new (const char *name, type_t father)
THROWF (tracing_error, 0, "can't create a container type with a nullptr name");
}
THROWF (tracing_error, 0, "can't create a container type with a nullptr name");
}
- type_t ret = nullptr;
-
- ret = newType (name, name, nullptr, TYPE_CONTAINER, father);
- if (father == nullptr){
+ type_t ret = newType(name, name, nullptr, TYPE_CONTAINER, father);
+ if (father == nullptr) {
rootType = ret;
rootType = ret;
- }
-
- if(father){
+ } else {
XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
DefineContainerEvent(ret);
}
XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
DefineContainerEvent(ret);
}