From owner-p4-projects@FreeBSD.ORG Mon Jan 30 08:08:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 81CB316A423; Mon, 30 Jan 2006 08:08:53 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 419C716A420 for ; Mon, 30 Jan 2006 08:08:53 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07A0B43D49 for ; Mon, 30 Jan 2006 08:08:53 +0000 (GMT) (envelope-from alc@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0U88q5I062655 for ; Mon, 30 Jan 2006 08:08:52 GMT (envelope-from alc@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0U88qhG062649 for perforce@freebsd.org; Mon, 30 Jan 2006 08:08:52 GMT (envelope-from alc@freebsd.org) Date: Mon, 30 Jan 2006 08:08:52 GMT Message-Id: <200601300808.k0U88qhG062649@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alc@freebsd.org using -f From: Alan Cox To: Perforce Change Reviews Cc: Subject: PERFORCE change 90671 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 08:08:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=90671 Change 90671 by alc@alc_home on 2006/01/30 08:08:25 Disentangle my diagnostics from INVARIANTS. Affected files ... .. //depot/projects/superpages/src/sys/amd64/amd64/pmap.c#7 edit Differences ... ==== //depot/projects/superpages/src/sys/amd64/amd64/pmap.c#7 (text+ko) ==== @@ -145,6 +145,8 @@ #include #endif +#define DPRINTF(x) do { if (0) printf x; } while (0) + #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -1734,18 +1736,14 @@ */ if ((ptpaddr & PG_PS) != 0) { if (sva + NBPDR == va_next && eva >= va_next) { -#ifdef INVARIANTS - printf("pmap_remove: superpage at %lx to destroy.\n", - sva); -#endif + DPRINTF(("pmap_remove: superpage at %lx to destroy.\n", + sva)); pmap_remove_pde(pmap, pde, sva); anyvalid = 1; continue; } else { -#ifdef INVARIANTS - printf("pmap_remove: superpage at %lx to demote !!!\n", - sva); -#endif + DPRINTF(("pmap_remove: superpage at %lx to demote !!!\n", + sva)); if (!pmap_demote(pmap, pde, sva)) { anyvalid = 1; /* XXX */ continue; @@ -1815,7 +1813,7 @@ pmap->pm_stats.resident_count--; pde = pmap_pde(pmap, pv->pv_va); if (*pde & PG_PS) { - printf("pmap_remove_all: superpage to demote !!!\n"); + DPRINTF(("pmap_remove_all: superpage to demote !!!\n")); if (!pmap_demote(pmap, pde, pv->pv_va)) { /* * All mappings within the same 2mpage were @@ -2198,9 +2196,7 @@ m->object == kernel_object || (m->object == kmem_object && FALSE)) && m->reserv != NULL && m->reserv->refcnt == NBPDR / PAGE_SIZE) { -#ifdef INVARIANTS - printf("%s: pmap %p va %lx XXX\n", __func__, pmap, va); -#endif + DPRINTF(("%s: pmap %p va %lx XXX\n", __func__, pmap, va)); KASSERT(m->object->flags & OBJ_SUPERPAGES, ("pmap_enter: xxx")); mach_promote(pmap, pmap_pde(pmap, va), m->reserv); } @@ -2329,9 +2325,7 @@ if (m->reserv != NULL && m->reserv->refcnt == NBPDR / PAGE_SIZE && mpte->wire_count == NPTEPG) { -#ifdef INVARIANTS - printf("%s: pmap %p va %lx XXX\n", __func__, pmap, va); -#endif + DPRINTF(("%s: pmap %p va %lx XXX\n", __func__, pmap, va)); KASSERT(m->object->flags & OBJ_SUPERPAGES, ("pmap_enter_quick: xxx")); mach_promote(pmap, pmap_pde(pmap, va), m->reserv); @@ -2759,18 +2753,14 @@ } if (sva <= trunc_2mpage(pv->pv_va) && eva >= round_2mpage(pv->pv_va + 1)) { -#ifdef INVARIANTS - printf("pmap_remove_pages: superpage at %lx to destroy.\n", - trunc_2mpage(pv->pv_va)); -#endif + DPRINTF(("pmap_remove_pages: superpage at %lx to destroy.\n", + trunc_2mpage(pv->pv_va))); pmap_remove_pde(pmap, pde, trunc_2mpage(pv->pv_va)); npv = TAILQ_FIRST(&pmap->pm_pvlist); continue; } -#ifdef INVARIANTS - printf("pmap_remove_pages: superpage at %lx to demote !!!\n", - pv->pv_va); -#endif + DPRINTF(("pmap_remove_pages: superpage at %lx to demote !!!\n", + pv->pv_va)); if (!pmap_demote(pmap, pde, pv->pv_va)) { /* * All mappings within the same 2mpage were @@ -2930,7 +2920,7 @@ PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); if (*pde & PG_PS) { - printf("pmap_clear_ptes: superpage to demote !!!\n"); + DPRINTF(("pmap_clear_ptes: superpage to demote !!!\n")); if ((*pde & bit) == 0 || !pmap_demote(pmap, pde, pv->pv_va)) { /* @@ -3294,9 +3284,7 @@ atomic_subtract_int(&cnt.v_wire_count, 1); } -#ifdef INVARIANTS - printf("Promotion successful XXX\n"); -#endif + DPRINTF(("Promotion successful XXX\n")); } static boolean_t