X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..c912b7d6e75473bd05731ccf77f3e2d82afb7802:/src/instr/instr_paje.c diff --git a/src/instr/instr_paje.c b/src/instr/instr_paje.c index 74cb8813be..3c1591c188 100644 --- a/src/instr/instr_paje.c +++ b/src/instr/instr_paje.c @@ -233,6 +233,7 @@ container_t newContainer (const char *name, e_container_types kind, container_t static container_t recursiveGetContainer (const char *name, container_t root) { + if (name == NULL || root == NULL) return NULL; if (strcmp (root->name, name) == 0) return root; xbt_dict_cursor_t cursor = NULL; @@ -247,12 +248,22 @@ static container_t recursiveGetContainer (const char *name, container_t root) container_t getContainer (const char *name) { + if (name == NULL) return NULL; return recursiveGetContainer(name, rootContainer); } +int knownContainerWithName (const char *name) +{ + if (xbt_dict_get_or_null (allContainers, name)){ + return 1; + }else{ + return 0; + } +} + container_t getContainerByName (const char *name) { - return (container_t)xbt_dict_get_or_null (allContainers, name); + return (container_t)xbt_dict_get (allContainers, name); } char *getContainerIdByName (const char *name) @@ -299,7 +310,10 @@ void destroyContainer (container_t container) TRACE_paje_dump_buffer(1); //trace my destruction - new_pajeDestroyContainer(container); + if (!TRACE_disable_destroy()){ + //do not trace the container destruction if user requests + new_pajeDestroyContainer(container); + } //free xbt_free (container->name);