summaryrefslogtreecommitdiff
path: root/viengoos/pager.c
diff options
context:
space:
mode:
authorneal <neal>2008-06-23 19:55:16 +0000
committerneal <neal>2008-06-23 19:55:16 +0000
commit13948e6ff6a0cf094c9d104852fbf6e36a7f2e8d (patch)
treef187feeebfceb906908b2f2a672f5c595be3f574 /viengoos/pager.c
parentbc31075886288487b51b1a856f8718011a5d69e6 (diff)
2008-06-23 Neal H. Walfield <neal@gnu.org>
* pager.c: Include "profile.h". (pager_collect): Profile.
Diffstat (limited to 'viengoos/pager.c')
-rw-r--r--viengoos/pager.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/viengoos/pager.c b/viengoos/pager.c
index d389c9b..a489dbe 100644
--- a/viengoos/pager.c
+++ b/viengoos/pager.c
@@ -23,6 +23,7 @@
#include "activity.h"
#include "object.h"
#include "pager.h"
+#include "profile.h"
int pager_min_alloc_before_next_collect;
@@ -322,13 +323,15 @@ pager_collect (int goal)
int available_memory = zalloc_memory + available_list_count (&available);
- debug (0, "Frames: %d, available: %d (%d%%), paging out: %d, "
+ debug (5, "Frames: %d, available: %d (%d%%), pending page out: %d, "
"low water: %d, goal: %d",
memory_total,
available_memory, (available_memory * 100) / memory_total,
laundry_list_count (&laundry),
PAGER_LOW_WATER_MARK, goal);
+ profile_start ((uintptr_t) &pager_collect, __FUNCTION__);
+
/* Find a victim. */
struct activity *victim;
struct activity *parent;
@@ -549,5 +552,8 @@ pager_collect (int goal)
allocations as there are currently remaining pages. */
pager_min_alloc_before_next_collect
= (zalloc_memory + available_list_count (&available)) / 3;
+
+ profile_end ((uintptr_t) &pager_collect);
+
return total_freed;
}