From: mquinson Date: Tue, 7 Jul 2009 13:19:10 +0000 (+0000) Subject: Display the list of still queued messages in SG mode when existing the process X-Git-Tag: SVN~1187 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b7980267bb6ada39ebd474236cf365a85d1a37b9 Display the list of still queued messages in SG mode when existing the process git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6454 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/ChangeLog b/ChangeLog index 2149aec543..3ee0166c2f 100644 --- 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] diff --git a/src/gras/Virtu/sg_process.c b/src/gras/Virtu/sg_process.c index 85148457fd..0f1889e23d 100644 --- a/src/gras/Virtu/sg_process.c +++ b/src/gras/Virtu/sg_process.c @@ -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 */