diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2012-12-12 20:49:07 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2012-12-12 20:49:07 +0400 |
commit | cccc0f3eb47c1173be6400ee9aa197248635955f (patch) | |
tree | 50756aa6c8a50d7366cd552745cea71ff9f1d08d /finalize.c | |
parent | 54a91f5254a1c5b2081e753cde47e6fa3a612e23 (diff) | |
download | bdwgc-cccc0f3eb47c1173be6400ee9aa197248635955f.tar.gz |
Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
(minimize logging for Android when print_stats is off)
* alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
GC_finish_collection): Use GC_log_printf instead of
GC_stats_log_printf.
* finalize.c (GC_print_finalization_stats): Likewise.
* include/private/gc_priv.h (GC_COND_LOG_PRINTF): Likewise.
* alloc.c (GC_stopped_mark): Use GC_DBGLOG_PRINTF instead of
GC_COND_LOG_PRINTF (useful for Android).
* alloc.c (GC_expand_hp_inner): Reformat comment.
* alloc.c (GC_expand_hp_inner): Use GC_INFOLOG_PRINTF instead of
GC_COND_LOG_PRINTF (useful for Android).
* include/private/gc_priv.h (GC_stats_log_printf): Remove (macro and
prototype).
* include/private/gc_priv.h (GC_DBGLOG_PRINTF, GC_INFOLOG_PRINTF):
New macro (redirecting either to GC_COND_LOG_PRINTF or to
GC_log_printf/GC_info_log_printf if GC_ANDROID_LOG).
* include/private/gc_priv.h (GC_info_log_printf): New prototype (only
if GC_ANDROID_LOG).
* misc.c (GC_stats_log_printf): Rename to GC_info_log_printf.
Diffstat (limited to 'finalize.c')
-rw-r--r-- | finalize.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1093,20 +1093,20 @@ GC_INNER void GC_notify_or_invoke_finalizers(void) struct finalizable_object *fo; unsigned long ready = 0; - GC_stats_log_printf("%lu finalization entries;" - " %lu/%lu short/long disappearing links alive\n", - (unsigned long)GC_fo_entries, - (unsigned long)GC_dl_hashtbl.entries, - (unsigned long)IF_LONG_REFS_PRESENT_ELSE( + GC_log_printf("%lu finalization entries;" + " %lu/%lu short/long disappearing links alive\n", + (unsigned long)GC_fo_entries, + (unsigned long)GC_dl_hashtbl.entries, + (unsigned long)IF_LONG_REFS_PRESENT_ELSE( GC_ll_hashtbl.entries, 0)); for (fo = GC_finalize_now; 0 != fo; fo = fo_next(fo)) ++ready; - GC_stats_log_printf("%lu finalization-ready objects;" - " %ld/%ld short/long links cleared\n", - ready, - (long)GC_old_dl_entries - (long)GC_dl_hashtbl.entries, - (long)IF_LONG_REFS_PRESENT_ELSE( + GC_log_printf("%lu finalization-ready objects;" + " %ld/%ld short/long links cleared\n", + ready, + (long)GC_old_dl_entries - (long)GC_dl_hashtbl.entries, + (long)IF_LONG_REFS_PRESENT_ELSE( GC_old_ll_entries - GC_ll_hashtbl.entries, 0)); } #endif /* !SMALL_CONFIG */ |