Bladeren bron

The arguments of the FxT traces are of types "unsigned long". Fix a typo in the
trace generation too.

Cédric Augonnet 14 jaren geleden
bovenliggende
commit
9218287c64
3 gewijzigde bestanden met toevoegingen van 5 en 7 verwijderingen
  1. 1 1
      include/starpu_util.h
  2. 1 1
      src/common/fxt.c
  3. 3 5
      tools/fxt_tool.c

+ 1 - 1
include/starpu_util.h

@@ -141,7 +141,7 @@ 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 code);
+void starpu_trace_user_event(unsigned long code);
 
 /* Some helper functions for application using CUBLAS kernels */
 void starpu_helper_cublas_init(void);

+ 1 - 1
src/common/fxt.c

@@ -110,7 +110,7 @@ void _starpu_fxt_register_thread(unsigned cpuid)
 
 #endif
 
-void starpu_trace_user_event(unsigned code __attribute__((unused)))
+void starpu_trace_user_event(unsigned long code __attribute__((unused)))
 {
 #ifdef STARPU_USE_FXT
 	STARPU_TRACE_USER_EVENT(code);

+ 3 - 5
tools/fxt_tool.c

@@ -371,18 +371,16 @@ static void handle_end_codelet_body(void)
 static void handle_user_event(void)
 {
 	int worker;
-	unsigned code;
-	code = ev.param[2];	
+	unsigned long code = ev.param[0];
 
 	worker = find_worker_id(ev.param[1]);
 	if (worker < 0)
 	{
-		fprintf(out_paje_file, "9       %f     event      %sp      %d\n", get_event_time_stamp(), prefix, rank);
+		fprintf(out_paje_file, "9       %f     event      %sp      %ld\n", get_event_time_stamp(), prefix, code);
 	}
 	else {
-		fprintf(out_paje_file, "9       %f     event      %s%"PRIu64"      %d\n", get_event_time_stamp(), prefix, ev.param[1], code);
+		fprintf(out_paje_file, "9       %f     event      %s%"PRIu64"      %ld\n", get_event_time_stamp(), prefix, ev.param[1], code);
 	}
-
 }
 
 static void handle_start_callback(void)