Ver código fonte

Let profiling record the workers topology before disabling events.

Samuel Thibault 12 anos atrás
pai
commit
9cf22e94cc
3 arquivos alterados com 6 adições e 5 exclusões
  1. 1 3
      src/common/fxt.c
  2. 1 1
      src/common/fxt.h
  3. 4 1
      src/core/workers.c

+ 1 - 3
src/common/fxt.c

@@ -115,7 +115,7 @@ void starpu_fxt_stop_profiling()
 	fut_keychange(FUT_DISABLE, FUT_KEYMASKALL, threadid);
 }
 
-void _starpu_init_fxt_profiling(unsigned no_auto_start_trace, unsigned trace_buffer_size)
+void _starpu_init_fxt_profiling(unsigned trace_buffer_size)
 {
 	unsigned threadid;
 
@@ -142,8 +142,6 @@ void _starpu_init_fxt_profiling(unsigned no_auto_start_trace, unsigned trace_buf
 
 	atexit(_starpu_stop_fxt_profiling);
 
-/* TODO: check this out */
-//	unsigned int key_mask = no_auto_start_trace ? 0 : FUT_KEYMASKALL;
 	unsigned int key_mask = FUT_KEYMASKALL;
 
 	if (fut_setup(trace_buffer_size / sizeof(unsigned long), key_mask, threadid) < 0)

+ 1 - 1
src/common/fxt.h

@@ -122,7 +122,7 @@ void fut_set_filename(char *filename);
 long _starpu_gettid(void);
 
 /* Initialize the FxT library. */
-void _starpu_init_fxt_profiling(unsigned no_auto_start_trace, unsigned trace_buffer_size);
+void _starpu_init_fxt_profiling(unsigned trace_buffer_size);
 
 /* Stop the FxT library, and generate the trace file. */
 void _starpu_stop_fxt_profiling(void);

+ 4 - 1
src/core/workers.c

@@ -823,7 +823,7 @@ int starpu_init(struct starpu_conf *user_conf)
 	_starpu_init_tags();
 
 #ifdef STARPU_USE_FXT
-	_starpu_init_fxt_profiling(config.conf->no_auto_start_trace, config.conf->trace_buffer_size);
+	_starpu_init_fxt_profiling(config.conf->trace_buffer_size);
 #endif
 
 	_starpu_open_debug_logfile();
@@ -859,6 +859,9 @@ int starpu_init(struct starpu_conf *user_conf)
 	/* Launch "basic" workers (ie. non-combined workers) */
 	_starpu_launch_drivers(&config);
 
+	if (config.conf->no_auto_start_trace)
+		starpu_fxt_stop_profiling();
+
 	_STARPU_PTHREAD_MUTEX_LOCK(&init_mutex);
 	initialized = INITIALIZED;
 	/* Tell everybody that we initialized */