acid: add some debugging aid function for counting kernel image cache page refs
This commit is contained in:
parent
c29719ce84
commit
5e353e17c6
1 changed files with 15 additions and 0 deletions
|
@ -28,6 +28,21 @@ defn path(p) {
|
||||||
|
|
||||||
// print Image cache contents
|
// print Image cache contents
|
||||||
IHASHSIZE = 64;
|
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) {
|
defn imagecacheline(h) {
|
||||||
local d, p, q;
|
local d, p, q;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue