X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eb45199603c7ab5afe3b2a5df3c2bd56254974f8..a8904cce833688900dcef6f8a753ee47a9d81e22:/src/msg/msg_gos.c diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index 13f4bf12b8..682da5b937 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -294,7 +294,9 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(msg_task_t task, const char * msg_process_t process = MSG_process_self(); msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias); - /* FIXME: these functions are not traceable */ +#ifdef HAVE_TRACING + int call_end = TRACE_msg_task_put_start(task); +#endif /* Prepare the task to send */ t_simdata = task->simdata; @@ -317,6 +319,16 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(msg_task_t task, const char * simcall_comm_isend(mailbox, t_simdata->message_size, t_simdata->rate, task, sizeof(void *), match_fun, NULL, match_data, 0); t_simdata->comm = comm->s_comm; /* FIXME: is the field t_simdata->comm still useful? */ +#ifdef HAVE_TRACING + if (TRACE_is_enabled()) { + simcall_set_category(comm, task->category); + } +#endif + +#ifdef HAVE_TRACING + if (call_end) + TRACE_msg_task_put_end(); +#endif return comm; } @@ -344,8 +356,6 @@ void MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup) msg_process_t process = MSG_process_self(); msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias); - /* FIXME: these functions are not traceable */ - /* Prepare the task to send */ t_simdata = task->simdata; t_simdata->sender = process; @@ -358,10 +368,24 @@ void MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup) t_simdata->comm = NULL; msg_global->sent_msg++; +#ifdef HAVE_TRACING + int call_end = TRACE_msg_task_put_start(task); +#endif + /* Send it by calling SIMIX network layer */ smx_action_t comm = simcall_comm_isend(mailbox, t_simdata->message_size, t_simdata->rate, task, sizeof(void *), NULL, cleanup, NULL, 1); t_simdata->comm = comm; +#ifdef HAVE_TRACING + if (TRACE_is_enabled()) { + simcall_set_category(comm, task->category); + } +#endif + +#ifdef HAVE_TRACING + if (call_end) + TRACE_msg_task_put_end(); +#endif } /** \ingroup msg_task_usage @@ -834,8 +858,7 @@ const char *MSG_as_router_get_property_value(const char* asr, const char *name) */ xbt_dict_t MSG_as_router_get_properties(const char* asr) { - // FIXME do this function with a simcall - return xbt_lib_get_or_null(as_router_lib, asr, ROUTING_PROP_ASR_LEVEL); + return (simcall_asr_get_properties(asr)); } /**