Browse Source

fxt: manage field dir internally

Nathalie Furmento 4 years ago
parent
commit
068d49eb9b
3 changed files with 7 additions and 5 deletions
  1. 0 1
      include/starpu_fxt.h
  2. 5 1
      src/debug/traces/starpu_fxt.c
  3. 2 3
      tools/starpu_fxt_tool.c

+ 0 - 1
include/starpu_fxt.h

@@ -106,7 +106,6 @@ struct starpu_fxt_options
 
 void starpu_fxt_options_init(struct starpu_fxt_options *options);
 void starpu_fxt_options_shutdown(struct starpu_fxt_options *options);
-void starpu_fxt_options_set_dir(struct starpu_fxt_options *options);
 void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
 
 /**

+ 5 - 1
src/debug/traces/starpu_fxt.c

@@ -4263,8 +4263,10 @@ void starpu_fxt_options_init(struct starpu_fxt_options *options)
 	options->dumped_codelets = NULL;
 	options->activity_path = "activity.data";
 	options->sched_tasks_path = "sched_tasks.rec";
+	options->dir = NULL;
 }
 
+static
 void _set_dir(char *dir, char **option)
 {
 	if (*option)
@@ -4276,7 +4278,8 @@ void _set_dir(char *dir, char **option)
 	}
 }
 
-void starpu_fxt_options_set_dir(struct starpu_fxt_options *options)
+static
+void _starpu_fxt_options_set_dir(struct starpu_fxt_options *options)
 {
 	if (!options->dir)
 		return;
@@ -4659,6 +4662,7 @@ uint64_t _starpu_fxt_find_start_time(char *filename_in)
 
 void starpu_fxt_generate_trace(struct starpu_fxt_options *options)
 {
+	_starpu_fxt_options_set_dir(options);
 	_starpu_fxt_dag_init(options->dag_path);
 	_starpu_fxt_distrib_file_init(options);
 	_starpu_fxt_activity_file_init(options);

+ 2 - 3
tools/starpu_fxt_tool.c

@@ -32,7 +32,8 @@ static void usage()
 	fprintf(stderr, "   -i <input file[s]>  specify the input file[s]. Several files can be provided,\n");
 	fprintf(stderr, "                       or the option specified several times for MPI execution\n");
 	fprintf(stderr, "                       case\n");
-        fprintf(stderr, "   -o <output file>    specify the output file\n");
+        fprintf(stderr, "   -o <output file>    specify the paje output filename\n");
+	fprintf(stderr, "   -d <directory>      specify the directory in which to save files\n");
         fprintf(stderr, "   -c                  use a different colour for every type of task\n");
 	fprintf(stderr, "   -no-events          do not show events\n");
 	fprintf(stderr, "   -no-counter         do not show scheduler counters\n");
@@ -201,8 +202,6 @@ static int parse_args(int argc, char **argv)
 		return 77;
 	}
 
-	starpu_fxt_options_set_dir(&options);
-
 	return 0;
 }