git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8088
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
mc_transition_t q = NULL;
xbt_fifo_item_t item = NULL;
mc_state_t state = NULL;
mc_transition_t q = NULL;
xbt_fifo_item_t item = NULL;
mc_state_t state = NULL;
-
- //MC_show_stack(mc_stack);
+
+ /*
+ INFO0("*********************************");
+ MC_show_stack(mc_stack);*/
/* Trash the current state, no longer needed */
MC_SET_RAW_MEM;
/* Trash the current state, no longer needed */
MC_SET_RAW_MEM;
q = mc_current_state->executed_transition;
xbt_fifo_foreach(mc_stack, item, state, mc_state_t){
if(MC_transition_depend(q, state->executed_transition)){
q = mc_current_state->executed_transition;
xbt_fifo_foreach(mc_stack, item, state, mc_state_t){
if(MC_transition_depend(q, state->executed_transition)){
- DEBUG3("Dependence found at state %p (%p,%p)", state, state->executed_transition, q);
xbt_setset_foreach(state->enabled_transitions, cursor, trans){
if((trans->process == q->process) && !xbt_setset_set_belongs(state->done, trans)){
xbt_setset_foreach(state->enabled_transitions, cursor, trans){
if((trans->process == q->process) && !xbt_setset_set_belongs(state->done, trans)){
- DEBUG2("Unexplored interleaving found at state %p (%p)", state, trans);
+ DEBUG3("%s depend with %s at %p", q->name,
+ state->executed_transition->name, state);
xbt_setset_foreach(state->enabled_transitions, cursor, trans){
if(trans->process == q->process)
xbt_setset_foreach(state->enabled_transitions, cursor, trans){
if(trans->process == q->process)
trans->type = mc_isend;
trans->process = SIMIX_process_self();
trans->isend.rdv = rdv;
trans->type = mc_isend;
trans->process = SIMIX_process_self();
trans->isend.rdv = rdv;
- trans->name = bprintf("[%s][%s] iSend (%p)", trans->process->smx_host->name,
- trans->process->name, trans);
+ trans->name = bprintf("[%s]\t iSend (%p)", trans->process->smx_host->name, trans);
trans->type = mc_irecv;
trans->process = SIMIX_process_self();
trans->irecv.rdv = rdv;
trans->type = mc_irecv;
trans->process = SIMIX_process_self();
trans->irecv.rdv = rdv;
- trans->name = bprintf("[%s][%s] iRecv (%p)", trans->process->smx_host->name,
- trans->process->name, trans);
+ trans->name = bprintf("[%s]\t iRecv (%p)", trans->process->smx_host->name, trans);
trans->type = mc_wait;
trans->process = SIMIX_process_self();
trans->wait.comm = comm;
trans->type = mc_wait;
trans->process = SIMIX_process_self();
trans->wait.comm = comm;
- trans->name = bprintf("[%s][%s] Wait (%p)", trans->process->smx_host->name,
- trans->process->name, trans);
+ trans->name = bprintf("[%s]\t Wait (%p)", trans->process->smx_host->name, trans);
trans->type = mc_test;
trans->process = SIMIX_process_self();
trans->test.comm = comm;
trans->type = mc_test;
trans->process = SIMIX_process_self();
trans->test.comm = comm;
- trans->name = bprintf("[%s][%s] Test (%p)", trans->process->smx_host->name,
- trans->process->name, trans);
+ trans->name = bprintf("[%s]\t Test (%p)", trans->process->smx_host->name, trans);
trans->type = mc_waitany;
trans->process = SIMIX_process_self();
trans->waitany.comms = comms;
trans->type = mc_waitany;
trans->process = SIMIX_process_self();
trans->waitany.comms = comms;
- trans->name = bprintf("[%s][%s] WaitAny (%p)", trans->process->smx_host->name,
- trans->process->name, trans);
+ trans->name = bprintf("[%s]\t WaitAny (%p)", trans->process->smx_host->name, trans);
trans->type = mc_random;
trans->process = SIMIX_process_self();
trans->random.value = value;
trans->type = mc_random;
trans->process = SIMIX_process_self();
trans->random.value = value;
- trans->name = bprintf("[%s][%s] Random %d (%p)", trans->process->smx_host->name,
- trans->process->name, value, trans);
+ trans->name = bprintf("[%s]\t Random %d (%p)", trans->process->smx_host->name, value, trans);
*/
void MC_trans_intercept_waitany(xbt_dynar_t comms)
{
*/
void MC_trans_intercept_waitany(xbt_dynar_t comms)
{
mc_transition_t trans = NULL;
mc_state_t current_state = NULL;
mc_transition_t trans = NULL;
mc_state_t current_state = NULL;
- smx_comm_t comm = NULL;
-
if(!mc_replay_mode){
MC_SET_RAW_MEM;
if(!mc_replay_mode){
MC_SET_RAW_MEM;
+ trans = MC_trans_waitany_new(comms);
current_state = (mc_state_t)
xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack));
current_state = (mc_state_t)
xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack));
- xbt_dynar_foreach(comms, cursor, comm){
- trans = MC_trans_wait_new(comm);
- xbt_setset_set_insert(current_state->created_transitions, trans);
- xbt_setset_set_insert(current_state->transitions, trans);
- }
+ xbt_setset_set_insert(current_state->created_transitions, trans);
+ xbt_setset_set_insert(current_state->transitions, trans);
MC_UNSET_RAW_MEM;
}
SIMIX_process_yield();
MC_UNSET_RAW_MEM;
}
SIMIX_process_yield();
/* WaitAny transitions are enabled if any of it's communications has both
a sender and a receiver */
case mc_waitany:
/* WaitAny transitions are enabled if any of it's communications has both
a sender and a receiver */
case mc_waitany:
- xbt_dynar_foreach(trans->waitany.comms, index, comm){
+ 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);
if(comm->src_proc && comm->dst_proc){
xbt_setset_set_insert(enabled, trans);
DEBUG1("Transition %p is enabled for next state", trans);