A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
useless line
[simgrid.git]
/
src
/
xbt
/
xbt_log_layout_simple.c
diff --git
a/src/xbt/xbt_log_layout_simple.c
b/src/xbt/xbt_log_layout_simple.c
index
30108d4
..
be6b390
100644
(file)
--- a/
src/xbt/xbt_log_layout_simple.c
+++ b/
src/xbt/xbt_log_layout_simple.c
@@
-9,9
+9,9
@@
#include "xbt/sysdep.h"
#include "xbt/strbuff.h" /* For dynamic version when the static one fails */
#include "xbt/log_private.h"
#include "xbt/sysdep.h"
#include "xbt/strbuff.h" /* For dynamic version when the static one fails */
#include "xbt/log_private.h"
-#include "xbt/synchro.h" /* xbt_thread_name */
-#include "gras/virtu.h"
+#include "simgrid/simix.h" /* SIMIX_host_self_get_name */
+#include "surf/surf.h"
#include <stdio.h>
#include "portable.h"
#include <stdio.h>
#include "portable.h"
@@
-40,15
+40,20
@@
static int xbt_log_layout_simple_doit(xbt_log_layout_t l,
/* Display the proc info if available */
procname = xbt_procname();
/* Display the proc info if available */
procname = xbt_procname();
- if (*procname) {
+ if (
procname &&
*procname) {
len = snprintf(p, rem_size, "%s:%s:(%d) ",
len = snprintf(p, rem_size, "%s:%s:(%d) ",
-
gras_os_my
name(), procname, xbt_getpid());
+
SIMIX_host_self_get_
name(), procname, xbt_getpid());
check_overflow(len);
}
check_overflow(len);
}
+ else if (!procname) {
+ len = snprintf(p, rem_size, "%s::(%d) ",
+ SIMIX_host_self_get_name(), xbt_getpid());
+ check_overflow(len);
+ }
/* Display the date */
len = snprintf(p, rem_size, "%f] ",
/* Display the date */
len = snprintf(p, rem_size, "%f] ",
-
gras_os_time
() - simple_begin_of_time);
+
surf_get_clock
() - simple_begin_of_time);
check_overflow(len);
/* Display file position if not INFO */
check_overflow(len);
/* Display file position if not INFO */
@@
-81,7
+86,7
@@
xbt_log_layout_t xbt_log_layout_simple_new(char *arg)
res->do_layout = xbt_log_layout_simple_doit;
if (simple_begin_of_time < 0)
res->do_layout = xbt_log_layout_simple_doit;
if (simple_begin_of_time < 0)
- simple_begin_of_time =
gras_os_time
();
+ simple_begin_of_time =
surf_get_clock
();
return res;
}
return res;
}