Do not use system clock consistently if NO_CLOCK
authorIvan Maidanski <ivmai@mail.ru>
Wed, 25 Oct 2017 08:45:38 +0000 (11:45 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 25 Oct 2017 08:45:38 +0000 (11:45 +0300)
commitff55290a3bcab7f9763d74214c03a7b65646f990
tree79f681b0e484d1ec872fbe43a843c26044daac79
parent9d231fb884f33df6c285bd6c43671c13d2b26826
Do not use system clock consistently if NO_CLOCK

Issue #139 (bdwgc).

* alloc.c (GC_try_to_collect_inner, world_stopped_total_time,
world_stopped_total_divisor, MAX_TOTAL_TIME_DIVISOR, GC_stopped_mark):
Replace "ifndef SMALL_CONFIG" with "ifndef NO_CLOCK".
* reclaim.c (GC_reclaim_all): Likewise.
* alloc.c (GC_finish_collection): Replace "ifndef SMALL_CONFIG" with
"ifndef NO_CLOCK" except for GC_print_finalization_stats invocation.
* doc/README.macros (NO_CLOCK): Document.
* include/private/gc_priv.h (CLOCK_TYPE, GET_TIME, MS_TIME_DIFF): Do
not define if NO_CLOCK.
* include/private/gc_priv.h (GC_print_stats): Define as a macro (to 0)
only if both NO_CLOCK and SMALL_CONFIG are defined.
* misc.c (GC_print_stats): Do not define if both NO_CLOCK and
SMALL_CONFIG are defined.
* misc.c (GC_init): Do not set GC_print_stats only if both NO_CLOCK
and SMALL_CONFIG are defined.
* tests/test.c (run_one_test): Do not define start_time, reverse_time,
time_diff local variables (and do not use GET_TIME, MS_TIME_DIFF) if
NO_CLOCK is defined.
alloc.c
doc/README.macros
include/private/gc_priv.h
misc.c
reclaim.c
tests/test.c