From: alegrand Date: Wed, 29 Jun 2005 19:51:43 +0000 (+0000) Subject: helps for debuging without having to modify and recompile your code X-Git-Tag: v3.3~3879 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7b8507bc1dd3b18a2350a6d4eac309e87a4e13a8 helps for debuging without having to modify and recompile your code git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1476 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/msg/global.c b/src/msg/global.c index 0da383133a..f54618180d 100644 --- a/src/msg/global.c +++ b/src/msg/global.c @@ -11,6 +11,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(global, msg, "Logging specific to MSG (global)"); +int __stop_at_time = -1.0 ; + MSG_Global_t msg_global = NULL; /* static void MarkAsFailed(m_task_t t, TBX_HashTable_t failedProcessList); */ @@ -324,6 +326,13 @@ MSG_error_t MSG_main(void) /* xbt_fifo_size(msg_global->process_to_run) */ while (1) { xbt_context_empty_trash(); + if(xbt_fifo_size(msg_global->process_to_run) && (elapsed_time>0)) { + DEBUG0("**************************************************"); + } + if((__stop_at_time>0) && (MSG_getClock() >= __stop_at_time)) { + DEBUG0("Let's stop here!"); + } + while ((process = xbt_fifo_pop(msg_global->process_to_run))) { DEBUG3("Scheduling %s(%d) on %s", process->name,process->simdata->PID,