Skip to content

Commit bb56f26

Browse files
authored
add caml_print_timestamp to caml_gc_log (#2216)
1 parent 45dc697 commit bb56f26

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ocaml/runtime/misc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ void caml_gc_log (char *msg, ...)
8484
char fmtbuf[GC_LOG_LENGTH];
8585
va_list args;
8686
va_start (args, msg);
87+
if (caml_verb_gc & 0x1000) {
88+
caml_print_timestamp(stderr, caml_verb_gc & 0x2000);
89+
}
8790
snprintf(fmtbuf, GC_LOG_LENGTH, "[%02d] %s\n",
8891
(Caml_state_opt != NULL) ? Caml_state_opt->id : -1, msg);
8992
vfprintf(stderr, fmtbuf, args);

0 commit comments

Comments
 (0)