Samuel Thibault 4 anni fa
parent
commit
517daeb9d6
3 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. 12 0
      src/debug/traces/anim.c
  2. 2 0
      src/debug/traces/starpu_fxt.c
  3. 1 0
      src/debug/traces/starpu_fxt.h

+ 12 - 0
src/debug/traces/anim.c

@@ -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;

+ 2 - 0
src/debug/traces/starpu_fxt.c

@@ -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

+ 1 - 0
src/debug/traces/starpu_fxt.h

@@ -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