Browse Source

move fxt declarations to its own header

Samuel Thibault 13 years ago
parent
commit
d9fffa960b

+ 1 - 0
Makefile.am

@@ -56,6 +56,7 @@ versinclude_HEADERS = 				\
 	include/starpu_data.h			\
 	include/starpu_perfmodel.h		\
 	include/starpu_util.h			\
+	include/starpu_fxt.h			\
 	include/starpu_cuda.h			\
 	include/starpu_opencl.h			\
 	include/starpu_expert.h			\

+ 69 - 0
include/starpu_fxt.h

@@ -0,0 +1,69 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2011  Université de Bordeaux 1
+ * 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
+ * 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_perfmodel.h>
+
+#define STARPU_FXT_MAX_FILES	64
+
+struct starpu_fxt_codelet_event
+{
+	char symbol[256]; /* name of the codelet */
+	int workerid;
+	enum starpu_perf_archtype archtype;
+	uint32_t hash;
+	size_t size;
+	float time;
+};
+
+struct starpu_fxt_options
+{
+	unsigned per_task_colour;
+	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;
+	char *dag_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;
+
+	/*
+	 *	Output parameters
+	 */
+
+	char worker_names[STARPU_NMAXWORKERS][256]; 
+	enum starpu_perf_archtype worker_archtypes[STARPU_NMAXWORKERS];
+	int nworkers;
+
+	/* In case we want to dump the list of codelets to an external tool */
+	struct starpu_fxt_codelet_event **dumped_codelets;
+	long dumped_codelets_count;
+};
+
+void starpu_fxt_options_init(struct starpu_fxt_options *options);
+void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
+
+#endif /* __STARPU_FXT_H__ */

+ 0 - 47
include/starpu_util.h

@@ -23,7 +23,6 @@
 #include <string.h>
 #include <assert.h>
 #include <starpu.h>
-#include <starpu_perfmodel.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -174,52 +173,6 @@ 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_codelet_event
-{
-	char symbol[256]; /* name of the codelet */
-	int workerid;
-	enum starpu_perf_archtype archtype;
-	uint32_t hash;
-	size_t size;
-	float time;
-};
-
-struct starpu_fxt_options
-{
-	unsigned per_task_colour;
-	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;
-	char *dag_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;
-
-	/*
-	 *	Output parameters
-	 */
-
-	char worker_names[STARPU_NMAXWORKERS][256]; 
-	enum starpu_perf_archtype worker_archtypes[STARPU_NMAXWORKERS];
-	int nworkers;
-
-	/* In case we want to dump the list of codelets to an external tool */
-	struct starpu_fxt_codelet_event **dumped_codelets;
-	long dumped_codelets_count;
-};
-
-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);

+ 1 - 0
src/common/fxt.c

@@ -23,6 +23,7 @@
 
 #ifdef STARPU_USE_FXT
 #include <common/fxt.h>
+#include <starpu_fxt.h>
 
 #ifdef STARPU_HAVE_WINDOWS
 #include <windows.h>

+ 4 - 3
src/debug/traces/starpu_fxt.h

@@ -14,8 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#ifndef __STARPU_FXT_H__
-#define __STARPU_FXT_H__
+#ifndef __STARPU__FXT_H__
+#define __STARPU__FXT_H__
 
 #include <starpu.h>
 #include <starpu_config.h>
@@ -36,6 +36,7 @@
 #include <common/list.h>
 #include "../mpi/starpu_mpi_fxt.h"
 #include <starpu.h>
+#include "../../../include/starpu_fxt.h"
 
 void _starpu_fxt_dag_init(char *dag_filename);
 void _starpu_fxt_dag_terminate(void);
@@ -58,4 +59,4 @@ void _starpu_fxt_write_paje_header(FILE *file);
 
 #endif // STARPU_USE_FXT
 
-#endif // __STARPU_FXT_H__
+#endif // __STARPU__FXT_H__

+ 1 - 0
tools/starpu_fxt_tool.c

@@ -19,6 +19,7 @@
  */
 
 #include <starpu.h>
+#include <starpu_fxt.h>
 
 static struct starpu_fxt_options options;
 

+ 1 - 0
tools/starpu_perfmodel_plot.c

@@ -24,6 +24,7 @@
 
 #include <starpu.h>
 #include <starpu_perfmodel.h>
+#include <starpu_fxt.h>
 #include <core/perfmodel/perfmodel.h> // we need to browse the list associated to history-based models
 
 #ifdef __MINGW32__