]> Zhao Yanbai Git Server - minix.git/commitdiff
suppress kernel/VM memory debugging information
authorDavid van Moolenbroek <david@minix3.org>
Tue, 29 Dec 2009 21:35:12 +0000 (21:35 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Tue, 29 Dec 2009 21:35:12 +0000 (21:35 +0000)
kernel/arch/i386/memory.c
kernel/system/do_vmctl.c
servers/vm/pagefaults.c
servers/vm/vm.h

index 330cb9338028be42a1b0e24b4a0ea58fb082b6a6..7aafa6bf9342c830732026fdd3f086916523006e 100644 (file)
@@ -889,8 +889,10 @@ int vmcheck;                       /* if nonzero, can return VMSUSPEND */
                vmassert(caller->p_vmrequest.vmresult != VMSUSPEND);
                RTS_LOCK_UNSET(caller, RTS_VMREQUEST);
                if(caller->p_vmrequest.vmresult != OK) {
+#if DEBUG_VMASSERT
                        printf("virtual_copy: returning VM error %d\n",
                                caller->p_vmrequest.vmresult);
+#endif
                        NOREC_RETURN(virtualcopy, caller->p_vmrequest.vmresult);
                }
        }
index 6f7f9f426999873a7445d4cdba1e607aa1cc3b6f..9ab15789519e78f5113714784d3b9f2dc5e86b0a 100644 (file)
@@ -83,12 +83,11 @@ register message *m_ptr;    /* pointer to request message */
                target = proc_addr(proc_nr);
                p->p_vmrequest.vmresult = m_ptr->SVMCTL_VALUE;
                vmassert(p->p_vmrequest.vmresult != VMSUSPEND);
+#if DEBUG_VMASSERT
                if(p->p_vmrequest.vmresult != OK)
                        kprintf("SYSTEM: VM replied %d to mem request\n",
                                p->p_vmrequest.vmresult);
 
-
-#if 0
                printf("memreq reply: vm request sent by: %s / %d about %d; 0x%lx-0x%lx, wr %d, stack: %s ",
                        p->p_name, p->p_endpoint, p->p_vmrequest.who,
                        p->p_vmrequest.start,
index c6ce4dd7275ad42da4814b1e419c28e28141e261..6c5fc47551fa08f727204a6ce8eacab8e40fdb65 100644 (file)
@@ -169,11 +169,15 @@ int handle_memory(struct vmproc *vmp, vir_bytes mem, vir_bytes len, int wrflag)
        while(len > 0) {
                int r;
                if(!(region = map_lookup(vmp, mem))) {
+#if VERBOSE
                        map_printmap(vmp);
                        printf("VM: do_memory: memory doesn't exist\n");
+#endif
                        r = EFAULT;
                } else if(!(region->flags & VR_WRITABLE) && wrflag) {
+#if VERBOSE
                        printf("VM: do_memory: write to unwritable map\n");
+#endif
                        r = EFAULT;
                } else {
                        vir_bytes offset, sublen;
@@ -193,9 +197,11 @@ int handle_memory(struct vmproc *vmp, vir_bytes mem, vir_bytes len, int wrflag)
                }
        
                if(r != OK) {
+#if VERBOSE
                        printf("VM: memory range 0x%lx-0x%lx not available in %d\n",
                                arch_map2vir(vmp, mem), arch_map2vir(vmp, mem+len),
                                vmp->vm_endpoint);
+#endif
                        return r;
                }
        }
index c29610c5b18834b6f5b47008bcab6cd1d3610d6d..71298e3890d2a8e038ed2b821cf87d21e5c77b21 100644 (file)
@@ -18,6 +18,9 @@
 #define SANITYCHECKS   0
 #define VMSTATS                0
 
+/* How noisy are we supposed to be? */
+#define VERBOSE                0
+
 /* Minimum stack region size - 64MB. */
 #define MINSTACKREGION (64*1024*1024)