summaryrefslogtreecommitdiff
path: root/reclaim.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2019-01-14 09:52:57 +0300
committerIvan Maidanski <ivmai@mail.ru>2019-01-14 09:52:57 +0300
commitd99e63ecbe1b069193f5b9da7ca44f274d8cebde (patch)
treef9b7e39cc7280acdad832fc49f909d89993c2714 /reclaim.c
parent5561f509d7b345fa873b942f8ea1f835beed3510 (diff)
downloadbdwgc-d99e63ecbe1b069193f5b9da7ca44f274d8cebde.tar.gz
Report time with a nanosecond precision where available
Issue #258 (bdwgc). * alloc.c [!NO_CLOCK] (GC_time_lim_nsec): Update comment. * alloc.c [!NO_CLOCK && !GC_DISABLE_INCREMENTAL] (GC_timeout_stop_func): Declare nsec_diff local variable; use GC_time_lim_nsec. * alloc.c [!NO_CLOCK && !GC_DISABLE_INCREMENTAL] (GC_timeout_stop_func): Use NS_FRAC_TIME_DIFF(); print "ns" value after "ms" one. * alloc.c [!NO_CLOCK] (GC_try_to_collect_inner, GC_stopped_mark, GC_finish_collection): Likewise. * reclaim.c [!NO_CLOCK] (GC_reclaim_all): Likewise. * include/private/gc_priv.h [!NO_CLOCK && BSD_TIME] (MS_TIME_DIFF): Always round the result of division toward minus infinity. * include/private/gc_priv.h [!NO_CLOCK] (NS_FRAC_TIME_DIFF): New macro.
Diffstat (limited to 'reclaim.c')
-rw-r--r--reclaim.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/reclaim.c b/reclaim.c
index 73292b4f..3a573832 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -755,8 +755,10 @@ GC_INNER GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old)
CLOCK_TYPE done_time;
GET_TIME(done_time);
- GC_verbose_log_printf("Disposing of reclaim lists took %lu ms\n",
- MS_TIME_DIFF(done_time,start_time));
+ GC_verbose_log_printf(
+ "Disposing of reclaim lists took %lu ms %lu ns\n",
+ MS_TIME_DIFF(done_time, start_time),
+ NS_FRAC_TIME_DIFF(done_time, start_time));
}
# endif
return(TRUE);