瀏覽代碼

Use spaces instead of underscores to separate parameter descriptions

The data description might include underscores (e.g. in hmat)
Samuel Thibault 6 年之前
父節點
當前提交
b012313d37
共有 2 個文件被更改,包括 11 次插入5 次删除
  1. 8 2
      src/debug/traces/starpu_fxt.c
  2. 3 3
      tools/starpu_replay.c

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

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2017                                Inria
- * Copyright (C) 2009-2018                                Université de Bordeaux
+ * Copyright (C) 2009-2019                                Université de Bordeaux
  * Copyright (C) 2013                                     Joris Pablo
  * Copyright (C) 2017,2018                                Federal University of Rio Grande do Sul (UFRGS)
  * Copyright (C) 2011-2019                                CNRS
@@ -1609,7 +1609,7 @@ static void handle_codelet_details(struct fxt_ev_64 *ev, struct starpu_fxt_optio
 		int i;
 		for (i = 0; i < last_codelet_parameter[worker] && i < MAX_PARAMETERS; i++)
 		{
-			eaten += snprintf(parameters + eaten, sizeof(parameters) - eaten - 1, "%s%s", i?"_":"", last_codelet_parameter_description[worker][i]);
+			eaten += snprintf(parameters + eaten, sizeof(parameters) - eaten - 1, "%s%s", i?" ":"", last_codelet_parameter_description[worker][i]);
 		}
 	}
 	parameters[sizeof(parameters)-1] = 0;
@@ -1641,6 +1641,12 @@ static void handle_codelet_details(struct fxt_ev_64 *ev, struct starpu_fxt_optio
 		char *prefix = options->file_prefix;
 		unsigned sched_ctx = ev->param[0];
 
+		/* Paje won't like spaces, replace with underscores */
+		char *c;
+		for (c = parameters; *c; c++)
+			if (*c == ' ')
+				*c = '_';
+
 		worker_set_detailed_state(last_codelet_start[worker], prefix, worker, _starpu_last_codelet_symbol[worker], ev->param[1], parameters, ev->param[2], ev->param[4], job_id, ((double) task->kflops) / 1000000, X, Y, Z, task->iterations[0], task->iterations[1], options);
 		if (sched_ctx != 0)
 		{

+ 3 - 3
tools/starpu_replay.c

@@ -795,19 +795,19 @@ int main(int argc, char **argv)
 		}
 		else if (TEST("Parameters"))
 		{
-			/* Parameters line format is PARAM1_PARAM2_(...)PARAMi_(...)PARAMn */
+			/* Parameters line format is PARAM1 PARAM2 (...)PARAMi (...)PARAMn */
 			char * param_str = s + 12;
 			int count = 0;
 
 			for (i = 0 ; param_str[i] != '\n'; i++)
 			{
-				if (param_str[i] == '_') /* Checking the number of '_' (underscore), assuming that the file is not corrupted */
+				if (param_str[i] == ' ') /* Checking the number of ' ' (space), assuming that the file is not corrupted */
 				{
 					count++;
 				}
 			}
 
-			nb_parameters = count + 1; /* There is one underscore per paramater execept for the last one, that's why we have to add +1 (dirty programming) */
+			nb_parameters = count + 1; /* There is one space per paramater except for the last one, that's why we have to add +1 (dirty programming) */
 
 			/* This part of the algorithm will determine if it needs static or dynamic arrays */
 			alloc_mode = set_alloc_mode(nb_parameters);