Browse Source

merge trunk

Nathalie Furmento 10 years ago
parent
commit
73eca60223
4 changed files with 28 additions and 17 deletions
  1. 2 1
      src/datawizard/memory_nodes.c
  2. 4 0
      src/debug/traces/starpu_fxt.c
  3. 4 4
      tools/starpu_fxt_stats.c
  4. 18 12
      tools/starpu_fxt_tool.c

+ 2 - 1
src/datawizard/memory_nodes.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2014  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  * 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
@@ -132,6 +132,7 @@ void _starpu_memory_node_get_name(unsigned node, char *name, int size)
 		prefix = "SCC_shared";
 		break;
 	case STARPU_UNUSED:
+	default:
 		prefix = "unknown";
 		STARPU_ASSERT(0);
 	}

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

@@ -115,7 +115,9 @@ static double last_codelet_start[STARPU_NMAXWORKERS];
 static char last_codelet_symbol[STARPU_NMAXWORKERS][4*sizeof(unsigned long)];
 static int last_codelet_parameter[STARPU_NMAXWORKERS];
 #define MAX_PARAMETERS 8
+#ifdef STARPU_ENABLE_PAJE_CODELET_DETAILS
 static char last_codelet_parameter_description[STARPU_NMAXWORKERS][MAX_PARAMETERS][FXT_MAX_PARAMS*sizeof(unsigned long)];
+#endif
 
 /* If more than a period of time has elapsed, we flush the profiling info,
  * otherwise they are accumulated everytime there is a new relevant event. */
@@ -321,6 +323,7 @@ static void thread_pop_state(double time, const char *prefix, long unsigned int
 #endif
 }
 
+#ifdef STARPU_ENABLE_PAJE_CODELET_DETAILS
 static void worker_set_detailed_state(double time, const char *prefix, long unsigned int workerid, const char *name, unsigned long size, const char *parameters, unsigned long footprint, unsigned long long tag)
 {
 #ifdef STARPU_HAVE_POTI
@@ -332,6 +335,7 @@ static void worker_set_detailed_state(double time, const char *prefix, long unsi
 	fprintf(out_paje_file, "20	%.9f	%sw%lu	WS	%s	%lu	%s	%08lx	%016llx\n", time, prefix, workerid, name, size, parameters, footprint, tag);
 #endif
 }
+#endif
 
 static void mpicommthread_set_state(double time, const char *prefix, const char *name)
 {

+ 4 - 4
tools/starpu_fxt_stats.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  * 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
@@ -37,7 +37,7 @@ static uint64_t transfers[16][16];
 
 #define PROGNAME "starpu_fxt_stat"
 
-static void usage(char **argv)
+static void usage()
 {
 	fprintf(stderr, "Parse the log generated by FxT\n\n");
 	fprintf(stderr, "Usage: %s [ options ]\n", PROGNAME);
@@ -73,7 +73,7 @@ static void parse_args(int argc, char **argv, char **fin, char **fout)
 
 		if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0)
 		{
-			usage(argv);
+			usage();
 			exit(EXIT_SUCCESS);
 		}
 
@@ -87,7 +87,7 @@ static void parse_args(int argc, char **argv, char **fin, char **fout)
 	if (!*fin)
 	{
 		fprintf(stderr, "Incorrect usage, aborting\n");
-                usage(argv);
+                usage();
 		exit(77);
 	}
 }

+ 18 - 12
tools/starpu_fxt_tool.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2014  Universite de Bordeaux 1
- * Copyright (C) 2012-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012-2014  Centre National de la Recherche Scientifique
  *
  * 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
@@ -24,7 +24,7 @@
 
 #define PROGNAME "starpu_fxt_tool"
 
-static void usage(char **argv)
+static void usage()
 {
 	fprintf(stderr, "Generate a trace in the Paje format\n\n");
 	fprintf(stderr, "Usage: %s [ options ]\n", PROGNAME);
@@ -53,40 +53,46 @@ static void parse_args(int argc, char **argv)
 	unsigned reading_input_filenames = 0;
 
 	int i;
-	for (i = 1; i < argc; i++) {
-		if (strcmp(argv[i], "-c") == 0) {
+	for (i = 1; i < argc; i++)
+	{
+		if (strcmp(argv[i], "-c") == 0)
+		{
 			options.per_task_colour = 1;
 			reading_input_filenames = 0;
 			continue;
 		}
 
-		if (strcmp(argv[i], "-o") == 0) {
+		if (strcmp(argv[i], "-o") == 0)
+		{
 			options.out_paje_path = argv[++i];
 			reading_input_filenames = 0;
 			continue;
 		}
 
-		if (strcmp(argv[i], "-i") == 0) {
+		if (strcmp(argv[i], "-i") == 0)
+		{
 			options.filenames[options.ninputfiles++] = argv[++i];
 			reading_input_filenames = 1;
 			continue;
 		}
 
-		if (strcmp(argv[i], "-no-counter") == 0) {
+		if (strcmp(argv[i], "-no-counter") == 0)
+		{
 			options.no_counter = 1;
 			reading_input_filenames = 0;
 			continue;
 		}
 
-		if (strcmp(argv[i], "-no-bus") == 0) {
+		if (strcmp(argv[i], "-no-bus") == 0)
+		{
 			options.no_bus = 1;
 			reading_input_filenames = 0;
 			continue;
 		}
 
-		if (strcmp(argv[i], "-h") == 0
-		 || strcmp(argv[i], "--help") == 0) {
-			usage(argv);
+		if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0)
+		{
+			usage();
 			exit(EXIT_SUCCESS);
 		}
 
@@ -109,7 +115,7 @@ static void parse_args(int argc, char **argv)
 	if (!options.ninputfiles)
 	{
 		fprintf(stderr, "Incorrect usage, aborting\n");
-                usage(argv);
+                usage();
 		exit(77);
 	}
 }