Browse Source

Add mpi test states in the paje traceg

Samuel Thibault 8 years ago
parent
commit
ae54e35e71
2 changed files with 62 additions and 0 deletions
  1. 56 0
      src/debug/traces/starpu_fxt.c
  2. 6 0
      src/debug/traces/starpu_paje.c

+ 56 - 0
src/debug/traces/starpu_fxt.c

@@ -2868,6 +2868,46 @@ static void handle_mpi_uwait_end(struct fxt_ev_64 *ev, struct starpu_fxt_options
 		recfmt_mpicommthread_set_state(date, "P");
 }
 
+static void handle_mpi_testing_detached_begin(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
+{
+	double date = get_event_time_stamp(ev, options);
+
+	if (out_paje_file)
+		mpicommthread_push_state(date, options->file_prefix, "TD");
+	if (trace_file)
+		recfmt_mpicommthread_push_state(date, "TD");
+}
+
+static void handle_mpi_testing_detached_end(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
+{
+	double date = get_event_time_stamp(ev, options);
+
+	if (out_paje_file)
+		mpicommthread_pop_state(date, options->file_prefix);
+	if (trace_file)
+		recfmt_mpicommthread_pop_state(date);
+}
+
+static void handle_mpi_test_begin(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
+{
+	double date = get_event_time_stamp(ev, options);
+
+	if (out_paje_file)
+		mpicommthread_push_state(date, options->file_prefix, "MT");
+	if (trace_file)
+		recfmt_mpicommthread_push_state(date, "MT");
+}
+
+static void handle_mpi_test_end(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
+{
+	double date = get_event_time_stamp(ev, options);
+
+	if (out_paje_file)
+		mpicommthread_pop_state(date, options->file_prefix);
+	if (trace_file)
+		recfmt_mpicommthread_pop_state(date);
+}
+
 static void handle_set_profiling(struct fxt_ev_64 *ev, struct starpu_fxt_options *options)
 {
 	int status = ev->param[0];
@@ -3475,6 +3515,22 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 				handle_mpi_data_set_rank(&ev, options);
 				break;
 
+			case _STARPU_MPI_FUT_TESTING_DETACHED_BEGIN:
+				handle_mpi_testing_detached_begin(&ev, options);
+				break;
+
+			case _STARPU_MPI_FUT_TESTING_DETACHED_END:
+				handle_mpi_testing_detached_end(&ev, options);
+				break;
+
+			case _STARPU_MPI_FUT_TEST_BEGIN:
+				handle_mpi_test_begin(&ev, options);
+				break;
+
+			case _STARPU_MPI_FUT_TEST_END:
+				handle_mpi_test_end(&ev, options);
+				break;
+
 			case _STARPU_FUT_SET_PROFILING:
 				handle_set_profiling(&ev, options);
 				break;

+ 6 - 0
src/debug/traces/starpu_paje.c

@@ -276,9 +276,12 @@ void _starpu_fxt_write_paje_header(FILE *file STARPU_ATTRIBUTE_UNUSED)
 	poti_DefineEntityValue("RvS", "CtS", "ReceiveSubmitted", "0.1 1.0 1.0");
 	poti_DefineEntityValue("SdC", "CtS", "SendCompleted", "1.0 .5 1.0");
 	poti_DefineEntityValue("RvC", "CtS", "ReceiveCompleted", "0.5 1.0 1.0");
+	poti_DefineEntityValue("TD", "CtS", "Testing Detached", ".0 .0 .6");
+	poti_DefineEntityValue("MT", "CtS", "MPI Test", ".0 .0 .8");
 	poti_DefineEntityValue("Bu", "CtS", "Building task", ".5 .18 .0");
 	poti_DefineEntityValue("Su", "CtS", "Submiting task", ".3 .09 .0");
 	poti_DefineEntityValue("Th", "CtS", "Throttling task submission", ".8 .6 .6");
+	poti_DefineEntityValue("C", "CtS", "Callback", ".0 .3 .8");
 
 	/* Type for other threads */
 	poti_DefineEventType("user_user_event", "UT", "user event type");
@@ -422,9 +425,12 @@ void _starpu_fxt_write_paje_header(FILE *file STARPU_ATTRIBUTE_UNUSED)
 6       RvS       CtS      ReceiveSubmitted  \"0.1 1.0 1.0\"	\n\
 6       SdC       CtS      SendCompleted     \"1.0 .5 1.0\"	\n\
 6       RvC       CtS      ReceiveCompleted  \"0.5 1.0 1.0\"	\n\
+6       TD       CtS      \"Testing Detached\"  \".0 .0 .6\"	\n\
+6       MT       CtS      \"MPI Test\"  \".0 .0 .8\"	\n\
 6       Bu      CtS      \"Building task\"   \".5 .18 .0\"		\n\
 6       Su      CtS      \"Submitting task\" \".3 .09 .0\"		\n\
 6       Th      CtS      \"Throttling task submission\" \".8 .6 .6\"		\n\
+6       C       CtS      \"Callback\" \".0 .3 .8\"		\n\
 ");
 	for (i=1; i<STARPU_NMAX_SCHED_CTXS; i++)
 		fprintf(file, "\