Browse Source

Also include _starpu_fxt_get_job_id when running without FXT, it is also needed for various other profiling

Samuel Thibault 7 years ago
parent
commit
f6100cc998
2 changed files with 12 additions and 11 deletions
  1. 3 2
      src/common/fxt.c
  2. 9 9
      src/common/fxt.h

+ 3 - 2
src/common/fxt.c

@@ -21,6 +21,9 @@
 #include <starpu_util.h>
 #include <starpu_profiling.h>
 
+/* we need to identify each task to generate the DAG. */
+unsigned long _starpu_job_cnt = 0;
+
 #ifdef STARPU_USE_FXT
 #include <common/fxt.h>
 #include <starpu_fxt.h>
@@ -40,8 +43,6 @@ int _starpu_fxt_started = 0;
 starpu_pthread_mutex_t _starpu_fxt_started_mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 starpu_pthread_cond_t _starpu_fxt_started_cond = STARPU_PTHREAD_COND_INITIALIZER;
 
-/* we need to identify each task to generate the DAG. */
-unsigned long _starpu_job_cnt = 0;
 /* and their submission order. */
 unsigned long _starpu_submit_order = 0;
 

+ 9 - 9
src/common/fxt.h

@@ -225,6 +225,15 @@
 #define _STARPU_FUT_TASK_THROTTLE_START	0x5180
 #define _STARPU_FUT_TASK_THROTTLE_END	0x5181
 
+extern unsigned long _starpu_job_cnt;
+
+static inline unsigned long _starpu_fxt_get_job_id(void)
+{
+	unsigned long ret = STARPU_ATOMIC_ADDL(&_starpu_job_cnt, 1);
+	STARPU_ASSERT_MSG(_starpu_job_cnt != 0, "Oops, job_id wrapped!");
+	return ret;
+}
+
 #ifdef STARPU_USE_FXT
 #include <fxt/fxt.h>
 #include <fxt/fut.h>
@@ -262,15 +271,6 @@ static inline unsigned long _starpu_fxt_get_submit_order(void)
 	return ret;
 }
 
-extern unsigned long _starpu_job_cnt;
-
-static inline unsigned long _starpu_fxt_get_job_id(void)
-{
-	unsigned long ret = STARPU_ATOMIC_ADDL(&_starpu_job_cnt, 1);
-	STARPU_ASSERT_MSG(_starpu_job_cnt != 0, "Oops, job_id wrapped!");
-	return ret;
-}
-
 long _starpu_gettid(void);
 
 /* Initialize the FxT library. */