Prechádzať zdrojové kódy

WIP fxt xheckpoint events

Romain LION 5 rokov pred
rodič
commit
eb34fde3ec

+ 1 - 0
mpi/src/mpi_failure_tolerance/starpu_mpi_checkpoint.c

@@ -148,6 +148,7 @@ int starpu_mpi_submit_checkpoint_template(starpu_mpi_checkpoint_template_t cp_te
 	_starpu_mpi_checkpoint_post_cp_discard_recv(cp_template);
 
 	item = _starpu_mpi_checkpoint_template_get_first_data(cp_template);
+	_STARPU_MPI_TRACE_CHECKPOINT_BEGIN(current_instance, cp_template->checkpoint_domain);
 	while (item != _starpu_mpi_checkpoint_template_end(cp_template))
 	{
 		switch (item->type)

+ 1 - 0
mpi/src/mpi_failure_tolerance/starpu_mpi_checkpoint_template.c

@@ -466,6 +466,7 @@ int _checkpoint_template_digest_ack_reception(int checkpoint_id, int checkpoint_
 	{
 		_STARPU_MPI_DEBUG(0, "The CP (id:%d - inst:%d) has been successfully saved and acknowledged.\n", checkpoint_id, checkpoint_instance);
 		tracker = _starpu_mpi_checkpoint_tracker_validate_instance(tracker);
+		_STARPU_MPI_TRACE_CHECKPOINT_END(checkpoint_instance, cp_template->checkpoint_domain);
 		if (tracker==NULL)
 		{
 			// TODO:should warn some people, because the msg loggin is not implemented(this precise nodes to contact)

+ 6 - 0
mpi/src/starpu_mpi_fxt.h

@@ -58,6 +58,8 @@ extern "C"
 #define _STARPU_MPI_FUT_DRIVER_RUN_BEGIN		0x5216
 #define _STARPU_MPI_FUT_DRIVER_RUN_END			0x5217
 #define _STARPU_MPI_FUT_DATA_SET_TAG			0x5218
+#define _STARPU_MPI_FUT_CHECKPOINT_BEGIN            0x5220
+#define _STARPU_MPI_FUT_CHECKPOINT_END              0x5221
 
 #ifdef STARPU_USE_FXT
 
@@ -142,6 +144,10 @@ extern "C"
 	FUT_FULL_PROBE1(_STARPU_FUT_KEYMASK_MPI, _STARPU_MPI_FUT_DRIVER_RUN_BEGIN,  _starpu_gettid());
 #define _STARPU_MPI_TRACE_DRIVER_RUN_END()	\
 	FUT_FULL_PROBE1(_STARPU_FUT_KEYMASK_MPI, _STARPU_MPI_FUT_DRIVER_RUN_END, _starpu_gettid());
+#define _STARPU_MPI_TRACE_CHECKPOINT_BEGIN(cp_instance, cp_domain)	\
+	FUT_FULL_PROBE3(_STARPU_FUT_KEYMASK_EVENT, _STARPU_MPI_FUT_CHECKPOINT_BEGIN, (cp_instance), (cp_domain), _starpu_gettid());
+#define _STARPU_MPI_TRACE_CHECKPOINT_END(cp_instance, cp_domain)	\
+	FUT_FULL_PROBE3(_STARPU_FUT_KEYMASK_EVENT, _STARPU_MPI_FUT_CHECKPOINT_END, (cp_instance), (cp_domain), _starpu_gettid());
 #define TRACE
 #else
 #define _STARPU_MPI_TRACE_START(a, b)				do {} while(0);

+ 13 - 0
src/common/fxt.h

@@ -580,6 +580,19 @@ do {									\
 	} while (0)
 #endif
 
+#ifndef FUT_RAW_ALWAYS_PROBE1
+#define FUT_RAW_ALWAYS_PROBE1(CODE,P1) do {	\
+		unsigned long *__args __attribute__((unused))=	\
+			fut_getstampedbuffer(CODE,		\
+					     FUT_SIZE(1)); \
+		*(__args++)=(unsigned long)(P1); \
+		fut_commitstampedbuffer(FUT_SIZE(1)); \
+	} while (0)
+#endif
+#define FUT_DO_ALWAYS_PROBE1(CODE,P1) do { \
+        FUT_RAW_ALWAYS_PROBE1(FUT_CODE(CODE, 1),P1); \
+} while (0)
+
 #ifndef FUT_RAW_ALWAYS_PROBE2
 #define FUT_RAW_ALWAYS_PROBE2(CODE,P1,P2) do {	\
 		unsigned long *__args __attribute__((unused))=	\