/* Pimple to get an histogram of message sizes in the simulation */
xbt_dict_t msg_sizes = NULL;
+#ifdef HAVE_LATENCY_BOUND_TRACKING
xbt_dict_t latency_limited_dict = NULL;
+#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix,
"Logging specific to SIMIX (network)");
{
VERB2("Destroy communication %p; refcount initially %d",comm,comm->refcount);
+#ifdef HAVE_LATENCY_BOUND_TRACKING
//save is latency limited flag to use afterwards
- if (latency_limited_dict == NULL)
+ if (latency_limited_dict == NULL) {
latency_limited_dict = xbt_dict_new();
- DEBUG2("adding key %p with latency limited value %d to the dict", comm, SIMIX_action_is_latency_bounded(comm->act));
- xbt_dicti_set(latency_limited_dict, comm, SIMIX_action_is_latency_bounded(comm->act));
+ }
+ if (comm->act){
+ DEBUG2("adding key %p with latency limited value %d to the dict", comm, SIMIX_action_is_latency_bounded(comm->act));
+ xbt_dicti_set(latency_limited_dict, (uintptr_t)comm, SIMIX_action_is_latency_bounded(comm->act));
+ }
+#endif
comm->refcount--;
if(comm->refcount > 0)
comm->task_size, comm->rate);
#ifdef HAVE_TRACING
TRACE_smx_action_communicate (comm->act, comm->src_proc);
+ TRACE_surf_action (comm->act->surf_action, comm->act->category);
#endif
/* If any of the process is suspend, create the action but stop its execution,
return SIMIX_action_get_remains(comm->act);
}
+#ifdef HAVE_LATENCY_BOUND_TRACKING
/**
* \brief verify if communication is latency bounded
* \param comm The communication
uintptr_t data = 0;
xbt_dict_cursor_t cursor;
xbt_dict_foreach(latency_limited_dict,cursor,key,data) {
- DEBUG2("comparing key=%p with comm=%p", key, comm);
- if(comm == key){
- DEBUG2("key %p found, return value latency limited value %d", key, data);
+ DEBUG2("comparing key=%p with comm=%p", (void*)key, (void*)comm);
+ if((void*)comm == (void*)key){
+ DEBUG2("key %p found, return value latency limited value %d", (void*)key, (int)data);
return (int)data;
}
}
DEBUG1("calling SIMIX_action_is_latency_bounded(%p)", comm->act);
return SIMIX_action_is_latency_bounded(comm->act);
}
+#endif
/******************************************************************************/
/* SIMIX_network_copy_data callbacks */