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
commit7143164506a350d0aa88c08e50c34cbdfb9758d9 (patch)
treeb8cee92cf8d4d81001ba8f8cc89cb229f5d0ff35
parentbeb901b3d8f97a660a131cb170aa83ac38f2289b (diff)
downloadtxr-7143164506a350d0aa88c08e50c34cbdfb9758d9.tar.gz
txr-7143164506a350d0aa88c08e50c34cbdfb9758d9.tar.bz2
txr-7143164506a350d0aa88c08e50c34cbdfb9758d9.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),