diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-11-18 09:39:00 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2008-11-18 09:39:00 +0100 |
commit | 475f219207fc6ffb65005e117f8df4757a24c2d6 (patch) | |
tree | cfdb9a5e1c082e610fff09082ee1866c930b1fcb /viengoos | |
parent | c2790abd038ae456c78f81265d5f381fec895112 (diff) |
Print more ager statistics.
2008-11-18 Neal H. Walfield <neal@gnu.org>
* ager.c (ager_loop): Count the number of shared pages that are
unmapped, the total number of active pages and the total number of
inactive pages. Print this information.
Diffstat (limited to 'viengoos')
-rw-r--r-- | viengoos/ChangeLog | 6 | ||||
-rw-r--r-- | viengoos/ager.c | 24 |
2 files changed, 26 insertions, 4 deletions
diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog index af1b916..57420f5 100644 --- a/viengoos/ChangeLog +++ b/viengoos/ChangeLog @@ -1,5 +1,11 @@ 2008-11-18 Neal H. Walfield <neal@gnu.org> + * ager.c (ager_loop): Count the number of shared pages that are + unmapped, the total number of active pages and the total number of + inactive pages. Print this information. + +2008-11-18 Neal H. Walfield <neal@gnu.org> + * ager.c (ager_loop): Update use of profile_start to match new API. * pager.c (pager_collect): Likewise. diff --git a/viengoos/ager.c b/viengoos/ager.c index 2ca73b7..afd2168 100644 --- a/viengoos/ager.c +++ b/viengoos/ager.c @@ -471,6 +471,8 @@ ager_loop (void) bool also_unmap; + int shared_unmapped = 0; + /* We try to batch calls to l4_unmap, hence the acrobatics. */ /* Grab a batch of live objects starting with object I. */ @@ -508,7 +510,10 @@ ager_loop (void) if (desc->type == cap_page) /* We only unmap the object if it is a page. No other objects are actually mapped to users. */ - also_unmap = true; + { + also_unmap = true; + shared_unmapped ++; + } desc->mapped = false; desc->floating = true; } @@ -521,6 +526,8 @@ ager_loop (void) int became_inactive = 0; int became_active = 0; + int active = 0; + int inactive = 0; while (frame < frames) { @@ -612,6 +619,7 @@ ager_loop (void) ACTIVITY_STATS (desc->activity)->became_inactive ++; became_inactive ++; + inactive ++; /* Detach from active list and reattach to inactive list. */ @@ -622,7 +630,10 @@ ager_loop (void) (&desc->activity->frames[priority].inactive, desc); } else - ACTIVITY_STATS (desc->activity)->active ++; + { + ACTIVITY_STATS (desc->activity)->active ++; + active ++; + } } else /* The object was inactive. */ @@ -635,6 +646,7 @@ ager_loop (void) ACTIVITY_STATS (desc->activity)->became_active ++; became_active ++; + active ++; /* Detach from inactive list and reattach to the active list. */ @@ -646,6 +658,8 @@ ager_loop (void) desc->dirty |= dirty; } + else + inactive ++; } if (desc->dirty && ! desc->policy.discardable) @@ -669,11 +683,13 @@ ager_loop (void) ss_mutex_lock (&kernel_lock); int a = zalloc_memory + available_list_count (&available); debug (0, "%d: %d of %d (%d%%) free; laundry: %d; " - "%d became inactive, %d became active", + "%d active (%d new); %d inactive (%d new), " + "%d shared unmapped", period / FREQ, a, memory_total, (a * 100) / memory_total, laundry_list_count (&laundry), - became_inactive, became_active); + active, became_active, inactive, became_inactive, + shared_unmapped); ss_mutex_unlock (&kernel_lock); } } |