@@ -80,6 +80,18 @@ void _starpu_fxt_component_new(uint64_t component, char *name)
COMPONENT_ADD(components, ptr, comp);
}
+void _starpu_fxt_component_deinit(void)
+{
+ struct component *comp, *tmp;
+ HASH_ITER(hh, components, comp, tmp)
+ {
+ HASH_DEL(components, comp);
+ free(comp->children);
+ free(comp->name);
+ free(comp);
+ }
+}
+
static void fxt_component_dump(FILE *file, struct component *comp, unsigned depth)
{
unsigned i;
@@ -4255,6 +4255,8 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
_starpu_symbol_name_delete(itor);
+ _starpu_fxt_component_deinit();
#ifdef HAVE_FXT_BLOCKEV_LEAVE
fxt_blockev_leave(block);
#endif
@@ -82,6 +82,7 @@ void _starpu_fxt_component_push(FILE *output, struct starpu_fxt_options *options
void _starpu_fxt_component_pull(FILE *output, struct starpu_fxt_options *options, double timestamp, int workerid, uint64_t from, uint64_t to, uint64_t task, unsigned prio);
void _starpu_fxt_component_dump(FILE *output);
void _starpu_fxt_component_finish(FILE *output);
+void _starpu_fxt_component_deinit(void);
#endif // STARPU_USE_FXT