Przeglądaj źródła

Fix maximum size of symbols according to fxt's max parameters, thanks Guillaume Sylvand for the fix

Samuel Thibault 8 lat temu
rodzic
commit
4378b1b41f
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 1 1
      src/debug/traces/starpu_fxt.c
  2. 2 2
      src/debug/traces/starpu_fxt.h

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

@@ -277,7 +277,7 @@ static unsigned get_colour_symbol_blue(char *name)
 
 static double last_codelet_start[STARPU_NMAXWORKERS];
 /* _STARPU_FUT_DO_PROBE4STR records only 4 longs */
-char _starpu_last_codelet_symbol[STARPU_NMAXWORKERS][4*sizeof(unsigned long)];
+char _starpu_last_codelet_symbol[STARPU_NMAXWORKERS][(FXT_MAX_PARAMS-4)*sizeof(unsigned long)];
 static int last_codelet_parameter[STARPU_NMAXWORKERS];
 #define MAX_PARAMETERS 8
 static char last_codelet_parameter_description[STARPU_NMAXWORKERS][MAX_PARAMETERS][FXT_MAX_PARAMS*sizeof(unsigned long)];

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

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2012, 2015  Université de Bordeaux
+ * Copyright (C) 2009-2012, 2015-2016  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
@@ -38,7 +38,7 @@
 #include <starpu.h>
 #include "../../../include/starpu_fxt.h"
 
-extern char _starpu_last_codelet_symbol[STARPU_NMAXWORKERS][4*sizeof(unsigned long)];
+extern char _starpu_last_codelet_symbol[STARPU_NMAXWORKERS][(FXT_MAX_PARAMS-4)*sizeof(unsigned long)];
 
 void _starpu_fxt_dag_init(char *dag_filename);
 void _starpu_fxt_dag_terminate(void);