Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tiny optimizations
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 22 Mar 2010 10:08:49 +0000 (10:08 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 22 Mar 2010 10:08:49 +0000 (10:08 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7284 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Virtu/sg_process.c
src/xbt/xbt_log_layout_simple.c

index bc39cf2..d5c814c 100644 (file)
@@ -179,7 +179,7 @@ const char *xbt_procname(void)
     As a hack we check for maestro by looking to the assigned host, if it is
     NULL then we are sure is maestro
   */
     As a hack we check for maestro by looking to the assigned host, if it is
     NULL then we are sure is maestro
   */
-  if (process != NULL && SIMIX_host_self())
+  if (process != NULL && SIMIX_process_get_host(process))
     return SIMIX_process_get_name(process);
 
   return "";
     return SIMIX_process_get_name(process);
 
   return "";
index 4165fc7..4eb20d7 100644 (file)
@@ -89,9 +89,10 @@ static void xbt_log_layout_simple_doit(xbt_log_layout_t l,
   check_overflow;
 
   /* Display the proc info if available */
   check_overflow;
 
   /* Display the proc info if available */
-  if (strlen(xbt_procname())) {
+  const char *procname=xbt_procname();
+  if (strlen(procname)) {
     p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%s:%s:(%d) ",
     p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%s:%s:(%d) ",
-                  gras_os_myname(), xbt_procname(), (*xbt_getpid) ());
+                  gras_os_myname(), procname, (*xbt_getpid) ());
     check_overflow;
   }
 
     check_overflow;
   }