summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-06-19 06:48:19 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-06-19 06:48:19 -0700
commit6da59c10cb9cd59bdc04432f3f2a25df0991fac3 (patch)
treeb8cee92cf8d4d81001ba8f8cc89cb229f5d0ff35
parent95d5b41266ca3cd40dcd948ecad06d570be32812 (diff)
downloadtxr-6da59c10cb9cd59bdc04432f3f2a25df0991fac3.tar.gz
txr-6da59c10cb9cd59bdc04432f3f2a25df0991fac3.tar.bz2
txr-6da59c10cb9cd59bdc04432f3f2a25df0991fac3.zip
internal debug support: reduce noise from sweep_one.
* gc.c (sweep_one): If the swept object matches the break_obj, only log it if the object isn't free. Otherwise if break_obj is sitting on the free list, we will uselessly report on it on every sweep operation, which is very often under --gc-debug torture operation.
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 19032cbe..178e1cc6 100644
--- a/gc.c
+++ b/gc.c
@@ -521,7 +521,7 @@ static int sweep_one(obj_t *block)
#endif
#if CONFIG_EXTRA_DEBUGGING
- if (block == break_obj) {
+ if (block == break_obj && (block->t.type & FREE) == 0) {
#if HAVE_VALGRIND
VALGRIND_PRINTF_BACKTRACE("object %p swept (type = %x)\n",
convert(void *, block),