]> granicus.if.org Git - gc/commit
Improve logged messages about heap size and usage
authorIvan Maidanski <ivmai@mail.ru>
Wed, 12 Dec 2012 19:05:36 +0000 (23:05 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 12 Dec 2012 19:19:32 +0000 (23:19 +0400)
commit8072d4dddc958dfe92332c5a8e3b55e33ce3918c
tree50f5548cc43d903587799173fbdea0cf61973271
parentcccc0f3eb47c1173be6400ee9aa197248635955f
Improve logged messages about heap size and usage

* alloc.c (GC_stopped_mark): Print heap size to debug log in KiB
(using TO_KiB_UL macro) excluding unmapped memory size.
* alloc.c (GC_compute_heap_usage_percent): New inline function.
* alloc.c (GC_finish_collection): Use GC_DBGLOG_PRINTF instead of
GC_COND_LOG_PRINTF for heap usage logging; print heap usage in KiB;
log memory heap utilization in percent (using
GC_compute_heap_usage_percent).
* alloc.c (GC_expand_hp_inner): Log increased heap size (in KiB)
instead of increment size.
* include/private/gc_priv.h (TO_KiB_UL): New macro.
alloc.c
include/private/gc_priv.h