From 1bc7c9e9d97ae19be22a76d624f793b4ae1d5c31 Mon Sep 17 00:00:00 2001 From: neal Date: Wed, 26 Dec 2007 22:02:53 +0000 Subject: 2007-12-26 Neal H. Walfield * activity.h (activity_for_each_child): Improve comment. (activity_consistency_check): Remove. (activity_consistency_check_): Likewise. * activity.c (activity_consistency_check_): Remove. * object.c (memory_object_alloc): Remove call to activity_consistency_check. (object_find_soft): Likewise. (folio_free): Likewise. (folio_object_alloc): Likewise. --- viengoos/activity.c | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'viengoos/activity.c') diff --git a/viengoos/activity.c b/viengoos/activity.c index a37939d..37395e5 100644 --- a/viengoos/activity.c +++ b/viengoos/activity.c @@ -230,50 +230,3 @@ activity_dump (struct activity *activity) ss_mutex_unlock (&lru_lock); } - - -void -activity_consistency_check_ (const char *func, int line, - struct activity *activity) -{ -#if 0 - /* The number of objects on the active and inactive lists plus the - objects owned by the descendents must equal activity->frames. */ - assertx (activity, "%s:%d", func, line); - - int active = 0; - struct object_desc *d; - for (d = activity->active; d; - d = (d->activity_lru.next == activity->active - ? NULL : desc->activity_lru.next)) - active ++; - - int dirty = 0; - for (d = activity->inactive_dirty; d; - d = (d->activity_lru.next == activity->inactive_dirty - ? NULL : desc->activity_lru.next)) - dirty ++; - - int clean = 0; - for (d = activity->inactive_clean; d; - d = (d->activity_lru.next == activity->inactive_clean - ? NULL : desc->activity_lru.next)) - clean ++; - - int children = 0; - struct activity *child; - - activity_for_each_child (activity, child, - ({ children += child->frames; })); - - if (active + dirty + clean + children != activity->frames) - { - debug (0, "at %s:%d: frames (%d) " - "!= active (%d) + dirty (%d) + clean (%d) + children (%d)", - func, line, - activity->frames, active, dirty, clean, children); - activity_dump (activity); - } - assert (active + dirty + clean + children == activity->frames); -#endif -} -- cgit v1.2.3