Browse Source

- Major cleanup of the code generating the Paje trace
- When STARPU_GENERATE_TRACE is set to 1, a paje.trace file is created directly
when starpu_shutdown is called (starpu_fxt_tool is still there)
- Move most of the fxt_tool* files into src/debug/traces/ since this is now
something that is used by StarPU internally.

Cédric Augonnet 14 years ago
parent
commit
84af19fdde

+ 8 - 0
doc/starpu.texi

@@ -2375,6 +2375,14 @@ on the device. This variable is intended to be used for experimental purposes
 as it emulates devices that have a limited amount of memory.
 @end table
 
+@node STARPU_GENERATE_TRACE
+@subsubsection @code{STARPU_GENERATE_TRACE} -- Generate a Paje trace when StarPU is shut down
+@table @asis
+
+@item @emph{Description}
+When set to 1, this variable indicates that StarPU should automatically
+generate a Paje trace when starpu_shutdown is called.
+@end table
 
 
 @c ---------------------------------------------------------------------

+ 22 - 0
include/starpu_util.h

@@ -144,6 +144,28 @@ static inline int starpu_get_env_number(const char *str)
 /* Add an event in the execution trace if FxT is enabled */
 void starpu_trace_user_event(unsigned long code);
 
+#define STARPU_FXT_MAX_FILES	64
+struct starpu_fxt_options {
+	unsigned per_task_colour;
+	unsigned generate_distrib;
+	unsigned no_counter;
+	unsigned no_bus;
+	unsigned ninputfiles;
+	char *filenames[STARPU_FXT_MAX_FILES];
+	char *out_paje_path;
+	char *distrib_time_path;
+	char *activity_path;
+
+	/* In case we are going to gather multiple traces (eg in the case of
+	 * MPI processes), we may need to prefix the name of the containers. */
+	char *file_prefix;
+	uint64_t file_offset;
+	int file_rank;
+};
+
+void starpu_fxt_options_init(struct starpu_fxt_options *options);
+void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
+
 /* Some helper functions for application using CUBLAS kernels */
 void starpu_helper_cublas_init(void);
 void starpu_helper_cublas_shutdown(void);

+ 5 - 0
src/Makefile.am

@@ -100,6 +100,7 @@ noinst_HEADERS = 						\
 	drivers/opencl/driver_opencl.h				\
 	drivers/opencl/driver_opencl_utils.h			\
 	debug/starpu_debug_helpers.h				\
+	debug/traces/starpu_fxt.h				\
 	profiling/bound.h					\
 	profiling/profiling.h					\
 	util/starpu_insert_task_utils.h				\
@@ -185,6 +186,10 @@ libstarpu_la_SOURCES = 						\
 	util/starpu_insert_task.c				\
 	util/starpu_insert_task_utils.c				\
 	util/starpu_task_list.c					\
+	debug/traces/starpu_fxt.c				\
+	debug/traces/starpu_fxt_mpi.c				\
+	debug/traces/starpu_fxt_dag.c				\
+	debug/traces/starpu_paje.c				\
 	debug/latency.c						\
 	debug/structures_size.c					\
 	profiling/profiling.c					\

+ 25 - 2
src/common/fxt.c

@@ -17,8 +17,9 @@
 
 #include <starpu.h>
 #include <common/config.h>
-#ifdef STARPU_USE_FXT
+#include <starpu_util.h>
 
+#ifdef STARPU_USE_FXT
 #include <common/fxt.h>
 
 #ifdef STARPU_HAVE_WINDOWS
@@ -81,6 +82,23 @@ void _starpu_start_fxt_profiling(void)
 	return;
 }
 
+static void generate_paje_trace(char *input_fxt_filename, char *output_paje_filename)
+{
+	/* We take default options */
+	struct starpu_fxt_options options;
+	starpu_fxt_options_init(&options);
+
+	/* TODO parse some STARPU_GENERATE_TRACE_OPTIONS env variable */
+
+	options.ninputfiles = 1;
+	options.filenames[0] = input_fxt_filename;
+	options.out_paje_path = output_paje_filename;
+	options.file_prefix = "";
+	options.file_rank = -1;
+
+	starpu_fxt_generate_trace(&options);
+}
+
 void _starpu_stop_fxt_profiling(void)
 {
 	if (!written)
@@ -92,6 +110,11 @@ void _starpu_stop_fxt_profiling(void)
 #endif
 		fut_endup(PROF_FILE_USER);
 
+		/* Should we generate a Paje trace directly ? */
+		int generate_trace = starpu_get_env_number("STARPU_GENERATE_TRACE");
+		if (generate_trace == 1)
+			generate_paje_trace(PROF_FILE_USER, "paje.trace");
+
 		int ret = fut_done();
 		if (ret < 0)
 		{
@@ -109,7 +132,7 @@ void _starpu_fxt_register_thread(unsigned cpuid)
 	FUT_DO_PROBE2(FUT_NEW_LWP_CODE, cpuid, syscall(SYS_gettid));
 }
 
-#endif
+#endif // STARPU_USE_FXT
 
 void starpu_trace_user_event(unsigned long code __attribute__((unused)))
 {

File diff suppressed because it is too large
+ 1145 - 0
src/debug/traces/starpu_fxt.c


+ 62 - 0
src/debug/traces/starpu_fxt.h

@@ -0,0 +1,62 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2009, 2010, 2011  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#ifndef __STARPU_FXT_H__
+#define __STARPU_FXT_H__
+
+#include <starpu.h>
+#include <starpu_config.h>
+
+#ifdef STARPU_USE_FXT
+
+#include <search.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#include <common/fxt.h>
+#include <common/list.h>
+#include "../mpi/starpu_mpi_fxt.h"
+#include <starpu.h>
+
+#define FACTOR  100
+
+void starpu_fxt_dag_init(char *dag_filename);
+void starpu_fxt_dag_terminate(void);
+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_sync_point(void);
+
+/*
+ *	MPI
+ */
+
+int starpu_fxt_mpi_find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank);
+void starpu_fxt_mpi_add_send_transfer(int src, int dst, int mpi_tag, size_t size, float date);
+void starpu_fxt_mpi_add_recv_transfer(int src, int dst, int mpi_tag, float date);
+void starpu_fxt_display_mpi_transfers(struct starpu_fxt_options *options, int *ranks, FILE *out_paje_file);
+
+void starpu_fxt_write_paje_header(FILE *file);
+
+#endif // STARPU_USE_FXT
+
+#endif // __STARPU_FXT_H__

+ 87 - 0
src/debug/traces/starpu_fxt_dag.c

@@ -0,0 +1,87 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010, 2011  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include "starpu_fxt.h"
+
+static FILE *out_file;
+static unsigned cluster_cnt;
+
+void starpu_fxt_dag_init(char *out_path)
+{
+	/* create a new file */
+	out_file = fopen(out_path, "w+");
+	if (!out_file) {
+		fprintf(stderr,"error while opening %s\n", out_path);
+		perror("fopen");
+		exit(1);
+	}
+	cluster_cnt = 0;
+
+	fprintf(out_file, "digraph G {\n");
+	fprintf(out_file, "\tcolor=white\n");
+	fprintf(out_file, "\trankdir=LR;\n");
+
+	/* Create a new cluster */
+	fprintf(out_file, "subgraph cluster_%d {\n", cluster_cnt);
+	fprintf(out_file, "\tcolor=black;\n");
+}
+
+void starpu_fxt_dag_terminate(void)
+{
+	/* Close the last cluster */
+	fprintf(out_file, "}\n");
+	/* Close the graph */
+	fprintf(out_file, "}\n");
+	fclose(out_file);
+}
+
+void starpu_fxt_dag_add_tag_deps(uint64_t child, uint64_t father)
+{
+	fprintf(out_file, "\t \"tag_%llx\"->\"tag_%llx\"\n", 
+		(unsigned long long)father, (unsigned long long)child);
+}
+
+void starpu_fxt_dag_add_task_deps(unsigned long dep_prev, unsigned long dep_succ)
+{
+	fprintf(out_file, "\t \"task_%lx\"->\"task_%lx\"\n", dep_prev, dep_succ);
+} 
+
+void starpu_fxt_dag_set_tag_done(uint64_t tag, const char *color)
+{
+
+	fprintf(out_file, "\t \"tag_%llx\" \[ style=filled, label=\"\", color=\"%s\"]\n", 
+		(unsigned long long)tag, color);
+}
+
+void starpu_fxt_dag_set_task_done(unsigned long job_id, const char *label, const char *color)
+{
+	fprintf(out_file, "\t \"task_%lx\" \[ style=filled, label=\"%s\", color=\"%s\"]\n", job_id, label, color);
+}
+
+void starpu_fxt_dag_add_sync_point(void)
+{
+	/* Close the previous cluster */
+	fprintf(out_file, "}\n");
+
+	cluster_cnt++;
+
+	/* Create a new cluster */
+	fprintf(out_file, "subgraph cluster_%d {\n", cluster_cnt);
+	fprintf(out_file, "\tcolor=black;\n");
+}

+ 36 - 9
tools/fxt_tool_mpi.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  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
@@ -14,11 +14,24 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#include "fxt_tool.h"
+#include <starpu.h>
+#include <common/config.h>
+
+#ifdef STARPU_USE_FXT
+
+#include "starpu_fxt.h"
+
+struct mpi_transfer {
+	unsigned matched;
+	int other_rank; /* src for a recv, dest for a send */
+	int mpi_tag;
+	size_t size;
+	float date;
+};
 
 /* Returns 0 if a barrier is found, -1 otherwise. In case of success, offset is
  * filled with the timestamp of the barrier */
-int find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank)
+int starpu_fxt_mpi_find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank)
 {
 	STARPU_ASSERT(offset);
 
@@ -93,7 +106,7 @@ unsigned mpi_recvs_used[64] = {0};
  * transfer, thus avoiding a quadratic complexity. */
 unsigned mpi_recvs_matched[64] = {0};
 
-void add_mpi_send_transfer(int src, int dst, int mpi_tag, size_t size, float date)
+void starpu_fxt_mpi_add_send_transfer(int src, int dst __attribute__((unused)), int mpi_tag, size_t size, float date)
 {
 	unsigned slot = mpi_sends_used[src]++;
 
@@ -117,7 +130,7 @@ void add_mpi_send_transfer(int src, int dst, int mpi_tag, size_t size, float dat
 	mpi_sends[src][slot].date = date;
 }
 
-void add_mpi_recv_transfer(int src, int dst, int mpi_tag, float date)
+void starpu_fxt_mpi_add_recv_transfer(int src __attribute__((unused)), int dst, int mpi_tag, float date)
 {
 	unsigned slot = mpi_recvs_used[dst]++;
 
@@ -140,7 +153,7 @@ void add_mpi_recv_transfer(int src, int dst, int mpi_tag, float date)
 	mpi_recvs[dst][slot].date = date;
 }
 
-struct mpi_transfer *try_to_match_send_transfer(int src, int dst, int mpi_tag)
+struct mpi_transfer *try_to_match_send_transfer(int src __attribute__((unused)), int dst, int mpi_tag)
 {
 	unsigned slot;
 	unsigned firstslot = mpi_recvs_matched[dst];
@@ -176,7 +189,7 @@ struct mpi_transfer *try_to_match_send_transfer(int src, int dst, int mpi_tag)
 
 static unsigned long mpi_com_id = 0;
 
-void display_all_transfers_from_trace(FILE *out_paje_file, int src)
+static void display_all_transfers_from_trace(FILE *out_paje_file, int src)
 {
 	unsigned slot;
 	for (slot = 0; slot < mpi_sends_used[src]; slot++)
@@ -195,8 +208,8 @@ void display_all_transfers_from_trace(FILE *out_paje_file, int src)
 
 			unsigned long id = mpi_com_id++;
 			/* TODO replace 0 by a MPI program ? */
-			fprintf(out_paje_file, "18	%f	MPIL	MPIroot   %d	mpi_%d_p	mpicom_%ld\n", start_date, size, /* XXX */src, id);
-			fprintf(out_paje_file, "19	%f	MPIL	MPIroot	  %d	mpi_%d_p	mpicom_%ld\n", end_date, size, /* XXX */dst, id);
+			fprintf(out_paje_file, "18	%f	MPIL	MPIroot   %ld	mpi_%d_p	mpicom_%ld\n", start_date, size, /* XXX */src, id);
+			fprintf(out_paje_file, "19	%f	MPIL	MPIroot	  %ld	mpi_%d_p	mpicom_%ld\n", end_date, size, /* XXX */dst, id);
 		}
 		else
 		{
@@ -206,3 +219,17 @@ void display_all_transfers_from_trace(FILE *out_paje_file, int src)
 
 	}
 }
+
+void starpu_fxt_display_mpi_transfers(struct starpu_fxt_options *options, int *ranks, FILE *out_paje_file)
+{
+	unsigned inputfile;
+
+	/* display the MPI transfers if possible */
+	for (inputfile = 0; inputfile < options->ninputfiles; inputfile++)
+	{
+		int filerank = ranks[inputfile];
+		display_all_transfers_from_trace(out_paje_file, filerank);
+	}
+}
+
+#endif // STARPU_USE_FXT

+ 35 - 4
tools/histo_paje.c

@@ -1,7 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Université de Bordeaux 1
  *
  * 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
@@ -15,9 +14,9 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#include "histo_paje.h"
+#include "starpu_fxt.h"
 
-void write_paje_header(FILE *file)
+void starpu_fxt_write_paje_header(FILE *file)
 {
 	fprintf(file, "\%%EventDef	PajeDefineContainerType	1\n");
 	fprintf(file, "\%%	Alias	string\n");
@@ -121,4 +120,36 @@ void write_paje_header(FILE *file)
 	fprintf(file, "\%%	DestContainer	string\n");
 	fprintf(file, "\%%	Key	string\n");
 	fprintf(file, "\%%EndEventDef\n");
+
+	fprintf(file, "                                        \n \
+	1       MPIP      0       \"MPI Program\"                      	\n \
+	1       P      MPIP       \"Program\"                      	\n \
+	1       Mn      P       \"Memory Node\"                         \n \
+	1       T      Mn       \"Worker\"                               \n \
+	1       Sc       P       \"Scheduler State\"                        \n \
+	2       event   T       \"event type\"				\n \
+	3       S       T       \"Thread State\"                        \n \
+	3       MS       Mn       \"Memory Node State\"                        \n \
+	4       ntask    Sc       \"Number of tasks\"                        \n \
+	4       bw      Mn       \"Bandwidth\"                        \n \
+	6       I       S      Initializing       \"0.0 .7 1.0\"            \n \
+	6       D       S      Deinitializing       \"0.0 .1 .7\"            \n \
+	6       Fi       S      FetchingInput       \"1.0 .1 1.0\"            \n \
+	6       Po       S      PushingOutput       \"0.1 1.0 1.0\"            \n \
+	6       E       S       Executing       \".0 .6 .4\"            \n \
+	6       C       S       Callback       \".0 .3 .8\"            \n \
+	6       B       S       Blocked         \".9 .1 .0\"		\n \
+	6       Sl       S      Sleeping         \".9 .1 .0\"		\n \
+	6       P       S       Progressing         \".4 .1 .6\"		\n \
+	6       A       MS      Allocating         \".4 .1 .0\"		\n \
+	6       Ar       MS      AllocatingReuse       \".1 .1 .8\"		\n \
+	6       R       MS      Reclaiming         \".0 .1 .4\"		\n \
+	6       Co       MS     DriverCopy         \".3 .5 .1\"		\n \
+	6       No       MS     Nothing         \".0 .0 .0\"		\n \
+	5       MPIL     MPIP	P	P      MPIL\n \
+	5       L       P	Mn	Mn      L\n");
+
+	fprintf(file, "7      0.0 MPIroot      MPIP      0       root\n");
 }
+
+

+ 1 - 5
tools/Makefile.am

@@ -33,7 +33,7 @@ if STARPU_USE_FXT
 # TODO: prefix with starpu_
 bin_PROGRAMS += starpu_fxt_tool starpu_fxt_stats
 
-starpu_fxt_tool_SOURCES = starpu_fxt_tool.c fxt_tool_common.c fxt_tool_mpi.c dag_dot.c histo_paje.c
+starpu_fxt_tool_SOURCES = starpu_fxt_tool.c
 starpu_fxt_tool_CFLAGS = -I$(top_srcdir)/src/
 starpu_fxt_tool_LDADD =
 
@@ -50,9 +50,5 @@ starpu_machine_display_SOURCES = starpu_machine_display.c
 
 noinst_PROGRAMS =	cbc2paje lp2paje
 
-noinst_HEADERS = \
-	fxt_tool.h	\
-	histo_paje.h
-
 dist_bin_SCRIPTS +=	\
 	starpu_top.sh

+ 0 - 75
tools/fxt_tool.h

@@ -1,75 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  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
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * StarPU is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * See the GNU Lesser General Public License in COPYING.LGPL for more details.
- */
-
-#ifndef __FXT_TOOL_H__
-#define __FXT_TOOL_H__
-
-#include <search.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <common/fxt.h>
-#include <common/list.h>
-#include <starpu_mpi_fxt.h>
-#include <starpu.h>
-
-#include "histo_paje.h"
-
-#define FACTOR  100
-
-extern void init_dag_dot(void);
-extern void terminate_dat_dot(void);
-extern void add_deps(uint64_t child, uint64_t father);
-extern void dot_set_tag_done(uint64_t tag, const char *color);
-extern void dot_set_task_done(unsigned long job_id, const char *label, const char *color);
-extern void dot_add_sync_point(void);
-
-void set_next_other_worker_color(int workerid);
-void set_next_cpu_worker_color(int workerid);
-void set_next_cuda_worker_color(int workerid);
-const char *get_worker_color(int workerid);
-
-unsigned get_colour_symbol_red(char *name);
-unsigned get_colour_symbol_green(char *name);
-unsigned get_colour_symbol_blue(char *name);
-
-void reinit_colors(void);
-
-/*
- *	MPI
- */
-
-int find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank);
-uint64_t find_start_time(char *filename_in);
-
-struct mpi_transfer {
-	unsigned matched;
-	int other_rank; /* src for a recv, dest for a send */
-	int mpi_tag;
-	size_t size;
-	float date;
-};
-
-void add_mpi_send_transfer(int src, int dst, int mpi_tag, size_t size, float date);
-void add_mpi_recv_transfer(int src, int dst, int mpi_tag, float date);
-
-#endif // __FXT_TOOL_H__

+ 0 - 121
tools/fxt_tool_common.c

@@ -1,121 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  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
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * StarPU is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * See the GNU Lesser General Public License in COPYING.LGPL for more details.
- */
-
-#include "fxt_tool.h"
-
-static char *cpus_worker_colors[STARPU_NMAXWORKERS] = {"/greens9/7", "/greens9/6", "/greens9/5", "/greens9/4",  "/greens9/9", "/greens9/3",  "/greens9/2",  "/greens9/1"  };
-static char *cuda_worker_colors[STARPU_NMAXWORKERS] = {"/ylorrd9/9", "/ylorrd9/6", "/ylorrd9/3", "/ylorrd9/1", "/ylorrd9/8", "/ylorrd9/7", "/ylorrd9/4", "/ylorrd9/2",  "/ylorrd9/1"};
-static char *opencl_worker_colors[STARPU_NMAXWORKERS] = {"/blues9/9", "/blues9/6", "/blues9/3", "/blues9/1", "/blues9/8", "/blues9/7", "/blues9/4", "/blues9/2",  "/blues9/1"};
-static char *other_worker_colors[STARPU_NMAXWORKERS] = {"/greys9/9", "/greys9/8", "/greys9/7", "/greys9/6"};
-static char *worker_colors[STARPU_NMAXWORKERS];
-
-static unsigned opencl_index = 0;
-static unsigned cuda_index = 0;
-static unsigned cpus_index = 0;
-static unsigned other_index = 0;
-
-void set_next_other_worker_color(int workerid)
-{
-	worker_colors[workerid] = other_worker_colors[other_index++];
-}
-
-void set_next_cpu_worker_color(int workerid)
-{
-	worker_colors[workerid] = cpus_worker_colors[cpus_index++];
-}
-
-void set_next_cuda_worker_color(int workerid)
-{
-	worker_colors[workerid] = cuda_worker_colors[cuda_index++];
-}
-
-void set_next_opencl_worker_color(int workerid)
-{
-	worker_colors[workerid] = opencl_worker_colors[opencl_index++];
-}
-
-const char *get_worker_color(int workerid)
-{
-	return worker_colors[workerid];
-}
-
-unsigned get_colour_symbol_red(char *name)
-{
-	/* choose some colour ... that's disguting yes */
-	uint32_t hash_symbol = _starpu_crc32_string(name, 0);
-	return (unsigned)_starpu_crc32_string("red", hash_symbol) % 1024;
-}
-
-unsigned get_colour_symbol_green(char *name)
-{
-	/* choose some colour ... that's disguting yes */
-	uint32_t hash_symbol = _starpu_crc32_string(name, 0);
-	return (unsigned)_starpu_crc32_string("green", hash_symbol) % 1024;
-}
-
-unsigned get_colour_symbol_blue(char *name)
-{
-	/* choose some colour ... that's disguting yes */
-	uint32_t hash_symbol = _starpu_crc32_string(name, 0);
-	return (unsigned)_starpu_crc32_string("blue", hash_symbol) % 1024;
-}
-
-
-
-/* This must be called when we start handling a new trace */
-void reinit_colors(void)
-{
-	other_index = 0;
-	cpus_index = 0;
-	cuda_index = 0;
-}
-
-uint64_t find_start_time(char *filename_in)
-{
-	/* Open the trace file */
-	int fd_in;
-	fd_in = open(filename_in, O_RDONLY);
-	if (fd_in < 0) {
-	        perror("open failed :");
-	        exit(-1);
-	}
-
-	static fxt_t fut;
-	fut = fxt_fdopen(fd_in);
-	if (!fut) {
-	        perror("fxt_fdopen :");
-	        exit(-1);
-	}
-	
-	fxt_blockev_t block;
-	block = fxt_blockev_enter(fut);
-
-	struct fxt_ev_64 ev;
-
-	int ret = fxt_next_ev(block, FXT_EV_TYPE_64, (struct fxt_ev *)&ev);
-	STARPU_ASSERT (ret == FXT_EV_OK);
-
-	/* Close the trace file */
-	if (close(fd_in))
-	{
-	        perror("close failed :");
-	        exit(-1);
-	}
-	return (ev.time);
-}
-
-

+ 0 - 25
tools/histo_paje.h

@@ -1,25 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  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
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * StarPU is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * See the GNU Lesser General Public License in COPYING.LGPL for more details.
- */
-
-#ifndef __HISTO_PAJE_H__
-#define __HISTO_PAJE_H__
-
-#include <stdio.h>
-
-void write_paje_header(FILE *file);
-
-#endif // __HISTO_PAJE_H__

+ 15 - 1
tools/starpu_fxt_stats.c

@@ -14,7 +14,21 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#include "fxt_tool.h"
+//#include "fxt_tool.h"
+
+#include <search.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#include <common/fxt.h>
+#include <common/list.h>
+#include <starpu.h>
+
 
 static fxt_t fut;
 struct fxt_ev_64 ev;

File diff suppressed because it is too large
+ 14 - 1054
tools/starpu_fxt_tool.c