Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve debugging information
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 20 Dec 2010 09:45:36 +0000 (09:45 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 20 Dec 2010 09:45:36 +0000 (09:45 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9298 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/simix/smx_smurf.c

index 0e287f6..8c4b370 100644 (file)
@@ -53,12 +53,19 @@ void SIMIX_request_push()
 
 smx_req_t SIMIX_request_pop(void)
 {
 
 smx_req_t SIMIX_request_pop(void)
 {
-  return xbt_heap_pop(req_todo);
+  smx_req_t req = xbt_heap_pop(req_todo);
+  if(req)
+    DEBUG4("Popped request %s (%d) of %s; now %d requests waiting",
+        SIMIX_request_name(req->issuer->request.call),
+        req->issuer->request.call,
+        req->issuer->name,xbt_heap_size(req_todo));
+  return req;
 }
 
 void SIMIX_request_answer(smx_req_t req)
 {
   if (req->issuer != simix_global->maestro_process){
 }
 
 void SIMIX_request_answer(smx_req_t req)
 {
   if (req->issuer != simix_global->maestro_process){
+    DEBUG2("Answer request %s (%d)", SIMIX_request_name(req->call), req->call);
     req->issuer->request.call = REQ_NO_REQ;
     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, req->issuer);
   }
     req->issuer->request.call = REQ_NO_REQ;
     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, req->issuer);
   }