From: cristianrosa Date: Wed, 26 May 2010 13:18:14 +0000 (+0000) Subject: Add logging for transitions X-Git-Tag: v3_5~1009 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cfd550f11b062b4bbb199ef922198f0f378fc543?hp=b44d5e73c4bbb6c3e5619892e6be4d4e971bf736 Add logging for transitions git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7799 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/mc/mc_transition.c b/src/mc/mc_transition.c index d1882ab943..3d46e0fea4 100644 --- a/src/mc/mc_transition.c +++ b/src/mc/mc_transition.c @@ -1,5 +1,8 @@ #include "private.h" +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans, mc, + "Logging specific to MC transitions"); + /* Creates a new iSend transition */ mc_transition_t MC_trans_isend_new(smx_rdv_t rdv) { @@ -234,8 +237,10 @@ void MC_trans_compute_enabled(xbt_setset_set_t enabled, xbt_setset_set_t transit /* Wait transitions are enabled only if the communication has both a sender and receiver */ case mc_wait: - if(trans->wait.comm->src_proc && trans->wait.comm->dst_proc) + if(trans->wait.comm->src_proc && trans->wait.comm->dst_proc){ xbt_setset_set_insert(enabled, trans); + DEBUG1("Transition %p is enabled for next state", trans); + } break; /* WaitAny transitions are enabled if any of it's communications has both @@ -244,6 +249,7 @@ void MC_trans_compute_enabled(xbt_setset_set_t enabled, xbt_setset_set_t transit xbt_dynar_foreach(trans->waitany.comms, index, comm){ if(comm->src_proc && comm->dst_proc){ xbt_setset_set_insert(enabled, trans); + DEBUG1("Transition %p is enabled for next state", trans); break; } } @@ -252,6 +258,7 @@ void MC_trans_compute_enabled(xbt_setset_set_t enabled, xbt_setset_set_t transit /* The rest of the transitions cannot be disabled */ default: xbt_setset_set_insert(enabled, trans); + DEBUG1("Transition %p is enabled for next state", trans); break; } }