Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Display the list of still queued messages in SG mode when existing the process
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Jul 2009 13:19:10 +0000 (13:19 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Jul 2009 13:19:10 +0000 (13:19 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6454 48e7efb5-ca39-0410-a469-dd3cf9ba447f

ChangeLog
src/gras/Virtu/sg_process.c

index 2149aec..3ee0166 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,10 @@ SimGrid (3.3.2-svn) unstable; urgency=low
  SimDag:
   * Kill SD_link_get_properties: hard to maintain and makes very little sense
     Shout out if you used it.
+    
+ GRAS:
+  * Display the list of still queued messages in SG mode when existing
+    the process.
 
  XBT:
   * Add xbt_set_get_by_name_or_null() [Silas De Munck]
index 8514845..0f1889e 100644 (file)
@@ -96,9 +96,16 @@ void gras_process_exit()
   VERB2("GRAS: Finalizing process '%s' (%d)",
         SIMIX_process_get_name(SIMIX_process_self()), gras_os_getpid());
 
-  if (xbt_dynar_length(msg_pd->msg_queue))
-    WARN1("process %d terminated, but some messages are still queued",
-          gras_os_getpid());
+  if (xbt_dynar_length(msg_pd->msg_queue)) {
+    unsigned int cpt;
+    s_gras_msg_t msg;
+    WARN2("process %d terminated, but %ld messages are still queued. Message list:",
+          gras_os_getpid(),xbt_dynar_length(msg_pd->msg_queue));
+    xbt_dynar_foreach(msg_pd->msg_queue,cpt, msg) {
+      WARN5("   Message %s (%s) from %s@%s:%d",msg.type->name,e_gras_msg_kind_names[msg.kind],
+          gras_socket_peer_proc(msg.expe),gras_socket_peer_name(msg.expe),gras_socket_peer_port(msg.expe));
+    }
+  }
 
   /* if each process has its sockets list, we need to close them when the
      process finish */