Samuel Thibault лет назад: 8
Родитель
Сommit
94ca64b12c
3 измененных файлов с 29 добавлено и 29 удалено
  1. 9 9
      src/debug/traces/starpu_fxt.c
  2. 6 6
      src/debug/traces/starpu_fxt.h
  3. 14 14
      src/debug/traces/starpu_fxt_dag.c

+ 9 - 9
src/debug/traces/starpu_fxt.c

@@ -2154,7 +2154,7 @@ void handle_update_task_cnt(struct fxt_ev_64 *ev, struct starpu_fxt_options *opt
 		fprintf(activity_file, "cnt_submitted\t%.9f\t%d\n", current_timestamp, nsubmitted);
 }
 
-static void handle_tag(struct fxt_ev_64 *ev)
+static void handle_tag(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
 {
 	uint64_t tag;
 	unsigned long job;
@@ -2162,10 +2162,10 @@ static void handle_tag(struct fxt_ev_64 *ev)
 	tag = ev->param[0];
 	job = ev->param[1];
 
-	_starpu_fxt_dag_add_tag(tag, job);
+	_starpu_fxt_dag_add_tag(options->file_prefix, tag, job);
 }
 
-static void handle_tag_deps(struct fxt_ev_64 *ev)
+static void handle_tag_deps(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
 {
 	uint64_t child;
 	uint64_t father;
@@ -2173,7 +2173,7 @@ static void handle_tag_deps(struct fxt_ev_64 *ev)
 	child = ev->param[0];
 	father = ev->param[1];
 
-	_starpu_fxt_dag_add_tag_deps(child, father);
+	_starpu_fxt_dag_add_tag_deps(options->file_prefix, child, father);
 }
 
 static void handle_task_deps(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
@@ -2203,7 +2203,7 @@ static void handle_task_deps(struct fxt_ev_64 *ev, struct starpu_fxt_options *op
 	task->dependencies[task->ndeps++] = dep_prev;
 
 	/* There is a dependency between both job id : dep_prev -> dep_succ */
-	_starpu_fxt_dag_add_task_deps(dep_prev, dep_succ);
+	_starpu_fxt_dag_add_task_deps(options->file_prefix, dep_prev, dep_succ);
 }
 
 static void handle_task_submit(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
@@ -2247,7 +2247,7 @@ static void handle_task_done(struct fxt_ev_64 *ev, struct starpu_fxt_options *op
 		task_dump(job_id, options->file_rank);
 
 	if (!exclude_from_dag)
-		_starpu_fxt_dag_set_task_done(job_id, name, colour);
+		_starpu_fxt_dag_set_task_done(options->file_prefix, job_id, name, colour);
 }
 
 static void handle_tag_done(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
@@ -2276,7 +2276,7 @@ static void handle_tag_done(struct fxt_ev_64 *ev, struct starpu_fxt_options *opt
 		colour= (worker < 0)?"white":get_worker_color(worker);
 	}
 
-	_starpu_fxt_dag_set_tag_done(tag_id, colour);
+	_starpu_fxt_dag_set_tag_done(options->file_prefix, tag_id, colour);
 }
 
 static void handle_mpi_barrier(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
@@ -2853,11 +2853,11 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 				break;
 
 			case _STARPU_FUT_TAG:
-				handle_tag(&ev);
+				handle_tag(&ev, options);
 				break;
 
 			case _STARPU_FUT_TAG_DEPS:
-				handle_tag_deps(&ev);
+				handle_tag_deps(&ev, options);
 				break;
 
 			case _STARPU_FUT_TASK_DEPS:

+ 6 - 6
src/debug/traces/starpu_fxt.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2012, 2015-2016  Université de Bordeaux
+ * Copyright (C) 2009-2012, 2015-2017  Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -42,11 +42,11 @@ extern char _starpu_last_codelet_symbol[STARPU_NMAXWORKERS][(FXT_MAX_PARAMS-5)*s
 
 void _starpu_fxt_dag_init(char *dag_filename);
 void _starpu_fxt_dag_terminate(void);
-void _starpu_fxt_dag_add_tag(uint64_t tag, unsigned long job_id);
-void _starpu_fxt_dag_add_tag_deps(uint64_t child, uint64_t father);
-void _starpu_fxt_dag_set_tag_done(uint64_t tag, const char *color);
-void _starpu_fxt_dag_add_task_deps(unsigned long dep_prev, unsigned long dep_succ);
-void _starpu_fxt_dag_set_task_done(unsigned long job_id, const char *label, const char *color);
+void _starpu_fxt_dag_add_tag(const char *prefix, uint64_t tag, unsigned long job_id);
+void _starpu_fxt_dag_add_tag_deps(const char *prefix, uint64_t child, uint64_t father);
+void _starpu_fxt_dag_set_tag_done(const char *prefix, uint64_t tag, const char *color);
+void _starpu_fxt_dag_add_task_deps(const char *prefix, unsigned long dep_prev, unsigned long dep_succ);
+void _starpu_fxt_dag_set_task_done(const char *prefix, unsigned long job_id, const char *label, const char *color);
 void _starpu_fxt_dag_add_sync_point(void);
 
 /*

+ 14 - 14
src/debug/traces/starpu_fxt_dag.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013, 2015  Université de Bordeaux
+ * Copyright (C) 2010-2013, 2015, 2017  Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -64,37 +64,37 @@ void _starpu_fxt_dag_terminate(void)
 	fclose(out_file);
 }
 
-void _starpu_fxt_dag_add_tag(uint64_t tag, unsigned long job_id)
+void _starpu_fxt_dag_add_tag(const char *prefix, uint64_t tag, unsigned long job_id)
 {
 	if (out_file)
-		fprintf(out_file, "\t \"tag_%llx\"->\"task_%lu\"->\"tag_%llx\" [style=dashed]\n",
-			(unsigned long long)tag, (unsigned long)job_id, (unsigned long long) tag);
+		fprintf(out_file, "\t \"%stag_%llx\"->\"%stask_%lu\"->\"%stag_%llx\" [style=dashed]\n",
+			prefix, (unsigned long long)tag, prefix, (unsigned long)job_id, prefix, (unsigned long long) tag);
 }
 
-void _starpu_fxt_dag_add_tag_deps(uint64_t child, uint64_t father)
+void _starpu_fxt_dag_add_tag_deps(const char *prefix, uint64_t child, uint64_t father)
 {
 	if (out_file)
-		fprintf(out_file, "\t \"tag_%llx\"->\"tag_%llx\"\n",
-			(unsigned long long)father, (unsigned long long)child);
+		fprintf(out_file, "\t \"%stag_%llx\"->\"%stag_%llx\"\n",
+			prefix, (unsigned long long)father, prefix, (unsigned long long)child);
 }
 
-void _starpu_fxt_dag_add_task_deps(unsigned long dep_prev, unsigned long dep_succ)
+void _starpu_fxt_dag_add_task_deps(const char *prefix, unsigned long dep_prev, unsigned long dep_succ)
 {
 	if (out_file)
-		fprintf(out_file, "\t \"task_%lu\"->\"task_%lu\"\n", dep_prev, dep_succ);
+		fprintf(out_file, "\t \"%stask_%lu\"->\"%stask_%lu\"\n", prefix, dep_prev, prefix, dep_succ);
 }
 
-void _starpu_fxt_dag_set_tag_done(uint64_t tag, const char *color)
+void _starpu_fxt_dag_set_tag_done(const char *prefix, uint64_t tag, const char *color)
 {
 	if (out_file)
-		fprintf(out_file, "\t \"tag_%llx\" [ style=filled, fillcolor=\"%s\"]\n",
-			(unsigned long long)tag, color);
+		fprintf(out_file, "\t \"%stag_%llx\" [ style=filled, fillcolor=\"%s\"]\n",
+			prefix, (unsigned long long)tag, color);
 }
 
-void _starpu_fxt_dag_set_task_done(unsigned long job_id, const char *label, const char *color)
+void _starpu_fxt_dag_set_task_done(const char *prefix, unsigned long job_id, const char *label, const char *color)
 {
 	if (out_file)
-		fprintf(out_file, "\t \"task_%lu\" [ style=filled, label=\"%s\", fillcolor=\"%s\"]\n", job_id, label, color);
+		fprintf(out_file, "\t \"%stask_%lu\" [ style=filled, label=\"%s\", fillcolor=\"%s\"]\n", prefix, job_id, label, color);
 }
 
 void _starpu_fxt_dag_add_sync_point(void)