suppress kernel/VM memory debugging information
This commit is contained in:
parent
0bafee3d78
commit
ac9a5829a2
@ -889,8 +889,10 @@ int vmcheck; /* if nonzero, can return VMSUSPEND */
|
|||||||
vmassert(caller->p_vmrequest.vmresult != VMSUSPEND);
|
vmassert(caller->p_vmrequest.vmresult != VMSUSPEND);
|
||||||
RTS_LOCK_UNSET(caller, RTS_VMREQUEST);
|
RTS_LOCK_UNSET(caller, RTS_VMREQUEST);
|
||||||
if(caller->p_vmrequest.vmresult != OK) {
|
if(caller->p_vmrequest.vmresult != OK) {
|
||||||
|
#if DEBUG_VMASSERT
|
||||||
printf("virtual_copy: returning VM error %d\n",
|
printf("virtual_copy: returning VM error %d\n",
|
||||||
caller->p_vmrequest.vmresult);
|
caller->p_vmrequest.vmresult);
|
||||||
|
#endif
|
||||||
NOREC_RETURN(virtualcopy, caller->p_vmrequest.vmresult);
|
NOREC_RETURN(virtualcopy, caller->p_vmrequest.vmresult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,12 +83,11 @@ register message *m_ptr; /* pointer to request message */
|
|||||||
target = proc_addr(proc_nr);
|
target = proc_addr(proc_nr);
|
||||||
p->p_vmrequest.vmresult = m_ptr->SVMCTL_VALUE;
|
p->p_vmrequest.vmresult = m_ptr->SVMCTL_VALUE;
|
||||||
vmassert(p->p_vmrequest.vmresult != VMSUSPEND);
|
vmassert(p->p_vmrequest.vmresult != VMSUSPEND);
|
||||||
|
#if DEBUG_VMASSERT
|
||||||
if(p->p_vmrequest.vmresult != OK)
|
if(p->p_vmrequest.vmresult != OK)
|
||||||
kprintf("SYSTEM: VM replied %d to mem request\n",
|
kprintf("SYSTEM: VM replied %d to mem request\n",
|
||||||
p->p_vmrequest.vmresult);
|
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 ",
|
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_name, p->p_endpoint, p->p_vmrequest.who,
|
||||||
p->p_vmrequest.start,
|
p->p_vmrequest.start,
|
||||||
|
@ -169,11 +169,15 @@ int handle_memory(struct vmproc *vmp, vir_bytes mem, vir_bytes len, int wrflag)
|
|||||||
while(len > 0) {
|
while(len > 0) {
|
||||||
int r;
|
int r;
|
||||||
if(!(region = map_lookup(vmp, mem))) {
|
if(!(region = map_lookup(vmp, mem))) {
|
||||||
|
#if VERBOSE
|
||||||
map_printmap(vmp);
|
map_printmap(vmp);
|
||||||
printf("VM: do_memory: memory doesn't exist\n");
|
printf("VM: do_memory: memory doesn't exist\n");
|
||||||
|
#endif
|
||||||
r = EFAULT;
|
r = EFAULT;
|
||||||
} else if(!(region->flags & VR_WRITABLE) && wrflag) {
|
} else if(!(region->flags & VR_WRITABLE) && wrflag) {
|
||||||
|
#if VERBOSE
|
||||||
printf("VM: do_memory: write to unwritable map\n");
|
printf("VM: do_memory: write to unwritable map\n");
|
||||||
|
#endif
|
||||||
r = EFAULT;
|
r = EFAULT;
|
||||||
} else {
|
} else {
|
||||||
vir_bytes offset, sublen;
|
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(r != OK) {
|
||||||
|
#if VERBOSE
|
||||||
printf("VM: memory range 0x%lx-0x%lx not available in %d\n",
|
printf("VM: memory range 0x%lx-0x%lx not available in %d\n",
|
||||||
arch_map2vir(vmp, mem), arch_map2vir(vmp, mem+len),
|
arch_map2vir(vmp, mem), arch_map2vir(vmp, mem+len),
|
||||||
vmp->vm_endpoint);
|
vmp->vm_endpoint);
|
||||||
|
#endif
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
#define SANITYCHECKS 0
|
#define SANITYCHECKS 0
|
||||||
#define VMSTATS 0
|
#define VMSTATS 0
|
||||||
|
|
||||||
|
/* How noisy are we supposed to be? */
|
||||||
|
#define VERBOSE 0
|
||||||
|
|
||||||
/* Minimum stack region size - 64MB. */
|
/* Minimum stack region size - 64MB. */
|
||||||
#define MINSTACKREGION (64*1024*1024)
|
#define MINSTACKREGION (64*1024*1024)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user