diff options
author | neal <neal> | 2008-01-13 12:09:13 +0000 |
---|---|---|
committer | neal <neal> | 2008-01-13 12:09:13 +0000 |
commit | acbfe7d62c27aa27783d1ac0da21b6d65e3c07d6 (patch) | |
tree | 02c51958ff632af4c820e574e72e6aa7b7691cfe /viengoos | |
parent | a635a615deba4f6994ed479eff466a13bb383f3a (diff) |
2008-01-13 Neal H. Walfield <neal@gnu.org>
* activity.c (activity_destroy): When making a frame inactive, be
sure to reset its age to 0.
* list.h (list_unlink): Improve debugging output.
Diffstat (limited to 'viengoos')
-rw-r--r-- | viengoos/ChangeLog | 17 | ||||
-rw-r--r-- | viengoos/activity.c | 4 | ||||
-rw-r--r-- | viengoos/list.h | 17 |
3 files changed, 31 insertions, 7 deletions
diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog index 8236c44..3b33d3a 100644 --- a/viengoos/ChangeLog +++ b/viengoos/ChangeLog @@ -1,3 +1,20 @@ +2008-01-13 Neal H. Walfield <neal@gnu.org> + + * activity.c (activity_destroy): When making a frame inactive, be + sure to reset its age to 0. + + * list.h (list_unlink): Improve debugging output. + +2008-01-10 Neal H. Walfield <neal@gnu.org> + + * ager.c (ager_loop): Update activity statistics. Change the + number of iterations + + * activity.h (struct activity): Add field stats and + current_period. + (ACTIVITY_STATS): New macro. + (ACTIVITY_STAT_UPDATE): New macro. + 2008-01-06 Neal H. Walfield <neal@gnu.org> * object.h (object_age): Add parameter referenced. Update users. diff --git a/viengoos/activity.c b/viengoos/activity.c index 2838a92..3c2267c 100644 --- a/viengoos/activity.c +++ b/viengoos/activity.c @@ -129,6 +129,8 @@ activity_destroy (struct activity *activity, struct activity *victim) activity_lru_list_unlink (&victim->active, desc); + desc->age = 0; + if (desc->dirty && ! desc->policy.discardable) activity_lru_list_queue (&victim->parent->inactive_dirty, desc); else @@ -146,6 +148,8 @@ activity_destroy (struct activity *activity, struct activity *victim) next = hurd_btree_priorities_next (desc); + desc->age = 0; + if (desc->dirty && ! desc->policy.discardable) activity_lru_list_queue (&victim->parent->inactive_dirty, desc); else diff --git a/viengoos/list.h b/viengoos/list.h index 8a76512..aa01890 100644 --- a/viengoos/list.h +++ b/viengoos/list.h @@ -215,13 +215,16 @@ list_unlink (struct list *list, struct list_node *item) assert (item->prev); /* Ensure that ITEM appears on LIST. */ - assert ({ - struct list_node *i; - for (i = list_head (list); i; i = list_next (i)) - if (i == item) - break; - i; - }); + assertx (({ + struct list_node *i = item; + while (! LIST_SENTINEL_P (i->next)) + i = LIST_PTR (i->next); + assert (LIST_SENTINEL_P (i->next)); + + if (LIST_PTR (i->next) != list) + debug (0, "%p appears on %p", item, LIST_PTR (i->next)); + LIST_PTR (i->next) == list; + }), "list: %p (%d), item: %p", list, list_count (list), item); if (LIST_SENTINEL_P (item->next) && LIST_SENTINEL_P (item->prev)) /* The only item on the list. */ |