Browse Source

Fix paje trace event ordering

Samuel Thibault 11 years ago
parent
commit
59dfb62dcf

+ 7 - 7
src/debug/traces/starpu_fxt.c

@@ -315,9 +315,9 @@ static void handle_new_mem_node(struct fxt_ev_64 *ev, struct starpu_fxt_options
 
 		if (!options->no_bus)
 #ifdef STARPU_HAVE_POTI
-			poti_SetVariable(get_event_time_stamp(ev, options), new_memnode_container_alias, "bw", 0.0);
+			poti_SetVariable(get_event_time_stamp(ev, options), new_memnode_container_alias, "bw", get_event_time_stamp(ev, options));
 #else
-			fprintf(out_paje_file, "13	%.9f	%smm%"PRIu64"	bw	0.0\n", 0.0f, prefix, ev->param[0]);
+			fprintf(out_paje_file, "13	%.9f	%smm%"PRIu64"	bw	0.0\n", get_event_time_stamp(ev, options), prefix, ev->param[0]);
 #endif
 	}
 }
@@ -712,7 +712,7 @@ static void handle_user_event(struct fxt_ev_64 *ev, struct starpu_fxt_options *o
 	}
 #ifdef STARPU_HAVE_POTI
 	if (out_paje_file)
-		poti_NewEvent(get_event_time_stamp(ev, options), container, "event", paje_value);
+		poti_NewEvent(get_event_time_stamp(ev, options), container, "thread_event", paje_value);
 #endif
 }
 
@@ -1096,9 +1096,9 @@ static void handle_mpi_barrier(struct fxt_ev_64 *ev, struct starpu_fxt_options *
 		char container[STARPU_POTI_STR_LEN], paje_value[STARPU_POTI_STR_LEN];
 		snprintf(container, STARPU_POTI_STR_LEN, "%sp", options->file_prefix);
 		snprintf(paje_value, STARPU_POTI_STR_LEN, "%d", rank);
-		poti_NewEvent(get_event_time_stamp(ev, options), container, "event", paje_value);
+		poti_NewEvent(get_event_time_stamp(ev, options), container, "prog_event", paje_value);
 #else
-		fprintf(out_paje_file, "9	%.9f	event	%sp	%d\n", get_event_time_stamp(ev, options), options->file_prefix, rank);
+		fprintf(out_paje_file, "9	%.9f	prog_event	%sp	%d\n", get_event_time_stamp(ev, options), options->file_prefix, rank);
 #endif
 	}
 }
@@ -1304,9 +1304,9 @@ static void handle_event(struct fxt_ev_64 *ev, struct starpu_fxt_options *option
 #ifdef STARPU_HAVE_POTI
 		char container[STARPU_POTI_STR_LEN];
 		snprintf(container, STARPU_POTI_STR_LEN, "%sp", options->file_prefix);
-		poti_NewEvent(get_event_time_stamp(ev, options), container, "event", event);
+		poti_NewEvent(get_event_time_stamp(ev, options), container, "prog_event", event);
 #else
-		fprintf(out_paje_file, "9	%.9f	event	%sp	%s\n", get_event_time_stamp(ev, options), options->file_prefix, event);
+		fprintf(out_paje_file, "9	%.9f	prog_event	%sp	%s\n", get_event_time_stamp(ev, options), options->file_prefix, event);
 #endif
 	}
 }

+ 5 - 3
src/debug/traces/starpu_paje.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013  Université de Bordeaux 1
+ * Copyright (C) 2010-2014  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
@@ -141,6 +141,7 @@ void _starpu_fxt_write_paje_header(FILE *file)
 	poti_DefineContainerType("W", "T", "Worker");
 	poti_DefineContainerType("MPICt", "T", "MPI Communication Thread");
 	poti_DefineContainerType("Sc", "P", "Scheduler");
+	poti_DefineEventType("prog_event", "P", "program event type");
 
 	/* Types for the memory node */
 	poti_DefineVariableType("bw", "Mm", "Bandwidth", "0 0 0");
@@ -155,7 +156,7 @@ void _starpu_fxt_write_paje_header(FILE *file)
 	poti_DefineEntityValue("No", "MS", "Nothing", ".0 .0 .0");
 
 	/* Types for the Worker of the Memory Node */
-	poti_DefineEventType("event", "T", "event type");
+	poti_DefineEventType("thread_event", "T", "thread event type");
 	poti_DefineStateType("S", "T", "Thread State");
 	poti_DefineEntityValue("I", "S", "Initializing", "0.0 .7 1.0");
 	poti_DefineEntityValue("D", "S", "Deinitializing", "0.0 .1 .7");
@@ -216,7 +217,8 @@ void _starpu_fxt_write_paje_header(FILE *file)
 1       W      T       \"Worker\"                               \n\
 1       MPICt   T       \"MPI Communication Thread\"              \n\
 1       Sc       P       \"Scheduler State\"                        \n\
-2       event   T       \"event type\"				\n\
+2       prog_event   P       \"program event type\"				\n\
+2       thread_event   T       \"thread event type\"				\n\
 2       MPIev   MPICt    \"MPI event type\"			\n\
 3       S       T       \"Thread State\"                        \n\
 3       CtS     MPICt    \"Communication Thread State\"          \n");

+ 2 - 2
tools/starpu_paje_draw_histogram.in

@@ -108,8 +108,8 @@ for file in $inputfiles; do
 	exit 5
     fi
 # Sorting traces
-    head -1000 $file  > start.trace
-    tail --lines=+1001 $file  > end.trace
+    grep ^% $file > start.trace
+    grep -v ^% $file > end.trace
     sort -n -s --key=2,2 end.trace > endSorted.trace
     cat start.trace endSorted.trace > outputSorted.trace
 

+ 2 - 2
tools/starpu_paje_state_stats.in

@@ -109,8 +109,8 @@ for file in $inputfiles; do
 	exit 5
     fi
 # Sorting traces
-    head -1000 $file  > start.trace
-    tail --lines=+1001 $file  > end.trace
+    grep ^% $file > start.trace
+    grep -v ^% $file > end.trace
     sort -n -s --key=2,2 end.trace > endSorted.trace
     cat start.trace endSorted.trace > outputSorted.trace