summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-02-24 22:45:38 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-02-24 22:45:38 +0100
commit5e353e17c6d4410487bc33aaa07fdb3121962c16 (patch)
tree93cd6b8c1130c55845293d48b4316b379d3c3a63 /sys
parentc29719ce841be56ed8486697433f6059011c63ee (diff)
acid: add some debugging aid function for counting kernel image cache page refs
Diffstat (limited to 'sys')
-rw-r--r--sys/lib/acid/kernel15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/lib/acid/kernel b/sys/lib/acid/kernel
index d385248d3..2f604ab9e 100644
--- a/sys/lib/acid/kernel
+++ b/sys/lib/acid/kernel
@@ -28,6 +28,21 @@ defn path(p) {
// print Image cache contents
IHASHSIZE = 64;
+
+defn imagepagerefs(i) {
+ local p, n;
+
+ n = 0;
+ p = palloc.$tail;
+ while p != 0 && p.image != 0 do {
+ if p.image == i then {
+ n = n + 1;
+ }
+ p = p.prev;
+ }
+ return n;
+}
+
defn imagecacheline(h) {
local d, p, q;