From 70ea1310d10e2a3f91dbb350d235a97925c35a94 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 3 May 2019 23:52:49 +0200 Subject: pc kernel: remove countpagerefs() (thanks BurnZeZ) forgot to commit this... --- sys/src/9/pc/mmu.c | 91 ------------------------------------------------------ 1 file changed, 91 deletions(-) diff --git a/sys/src/9/pc/mmu.c b/sys/src/9/pc/mmu.c index 50832ac0f..c76c8962b 100644 --- a/sys/src/9/pc/mmu.c +++ b/sys/src/9/pc/mmu.c @@ -971,97 +971,6 @@ paddr(void *v) /* * More debugging. */ -void -countpagerefs(ulong *ref, int print) -{ - int i, n; - Mach *mm; - Page *pg; - Proc *p; - - n = 0; - for(i=0; immupdb){ - if(print){ - if(ref[pagenumber(p->mmupdb)]) - iprint("page %#.8lux is proc %d (pid %lud) pdb\n", - p->mmupdb->pa, i, p->pid); - continue; - } - if(ref[pagenumber(p->mmupdb)]++ == 0) - n++; - else - iprint("page %#.8lux is proc %d (pid %lud) pdb but has other refs!\n", - p->mmupdb->pa, i, p->pid); - } - if(p->kmaptable){ - if(print){ - if(ref[pagenumber(p->kmaptable)]) - iprint("page %#.8lux is proc %d (pid %lud) kmaptable\n", - p->kmaptable->pa, i, p->pid); - continue; - } - if(ref[pagenumber(p->kmaptable)]++ == 0) - n++; - else - iprint("page %#.8lux is proc %d (pid %lud) kmaptable but has other refs!\n", - p->kmaptable->pa, i, p->pid); - } - for(pg=p->mmuused; pg; pg=pg->next){ - if(print){ - if(ref[pagenumber(pg)]) - iprint("page %#.8lux is on proc %d (pid %lud) mmuused\n", - pg->pa, i, p->pid); - continue; - } - if(ref[pagenumber(pg)]++ == 0) - n++; - else - iprint("page %#.8lux is on proc %d (pid %lud) mmuused but has other refs!\n", - pg->pa, i, p->pid); - } - for(pg=p->mmufree; pg; pg=pg->next){ - if(print){ - if(ref[pagenumber(pg)]) - iprint("page %#.8lux is on proc %d (pid %lud) mmufree\n", - pg->pa, i, p->pid); - continue; - } - if(ref[pagenumber(pg)]++ == 0) - n++; - else - iprint("page %#.8lux is on proc %d (pid %lud) mmufree but has other refs!\n", - pg->pa, i, p->pid); - } - } - if(!print) - iprint("%d pages in proc mmu\n", n); - n = 0; - for(i=0; ipdbpool; pg; pg=pg->next){ - if(print){ - if(ref[pagenumber(pg)]) - iprint("page %#.8lux is in cpu%d pdbpool\n", - pg->pa, i); - continue; - } - if(ref[pagenumber(pg)]++ == 0) - n++; - else - iprint("page %#.8lux is in cpu%d pdbpool but has other refs!\n", - pg->pa, i); - } - } - if(!print){ - iprint("%d pages in mach pdbpools\n", n); - for(i=0; ipdballoc, MACHP(i)->pdbfree); - } -} - void checkfault(ulong, ulong) { -- cgit v1.2.3