Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm put various debugging printfs under #ifdef DEBUG.
details: https://anonhg.NetBSD.org/src/rev/74139f20d11a
branches: trunk
changeset: 477524:74139f20d11a
user: chs <chs%NetBSD.org@localhost>
date: Tue Oct 19 16:04:45 1999 +0000
description:
put various debugging printfs under #ifdef DEBUG.
diffstat:
sys/uvm/uvm_vnode.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (74 lines):
diff -r b6d7edba5bba -r 74139f20d11a sys/uvm/uvm_vnode.c
--- a/sys/uvm/uvm_vnode.c Tue Oct 19 10:35:37 1999 +0000
+++ b/sys/uvm/uvm_vnode.c Tue Oct 19 16:04:45 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_vnode.c,v 1.26 1999/09/12 01:17:42 chs Exp $ */
+/* $NetBSD: uvm_vnode.c,v 1.27 1999/10/19 16:04:45 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -350,13 +350,13 @@
uvn_reference(uobj)
struct uvm_object *uobj;
{
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
struct uvm_vnode *uvn = (struct uvm_vnode *) uobj;
#endif
UVMHIST_FUNC("uvn_reference"); UVMHIST_CALLED(maphist);
simple_lock(&uobj->vmobjlock);
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
if ((uvn->u_flags & UVM_VNODE_VALID) == 0) {
printf("uvn_reference: ref=%d, flags=0x%x\n", uvn->u_flags,
uobj->uo_refs);
@@ -459,7 +459,7 @@
*/
if (uobj->uo_npages) { /* I/O pending. iodone will free */
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
/*
* XXXCDC: very unlikely to happen until we have async i/o
* so print a little info message in case it does.
@@ -605,7 +605,7 @@
*/
while (uvn->u_obj.uo_npages) {
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
struct vm_page *pp;
for (pp = uvn->u_obj.memq.tqh_first ; pp != NULL ;
pp = pp->listq.tqe_next) {
@@ -860,10 +860,11 @@
} else {
start = trunc_page(start);
stop = round_page(stop);
+#ifdef DEBUG
if (stop > round_page(uvn->u_size))
printf("uvn_flush: strange, got an out of range "
"flush (fixed)\n");
-
+#endif
by_list = (uobj->uo_npages <=
((stop - start) >> PAGE_SHIFT) * UVN_HASH_PENALTY);
}
@@ -1632,7 +1633,7 @@
if (file_offset >= uvn->u_size) {
simple_unlock(&uvn->u_obj.vmobjlock);
UVMHIST_LOG(maphist,"<- BAD (size check)",0,0,0,0);
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
printf("uvn_io: note: size check fired\n");
#endif
return(VM_PAGER_BAD);
@@ -2042,7 +2043,7 @@
for (uvn = uvn_sync_q.sqh_first ; uvn ; uvn = uvn->u_syncq.sqe_next) {
simple_lock(&uvn->u_obj.vmobjlock);
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
if (uvn->u_flags & UVM_VNODE_DYING) {
printf("uvm_vnp_sync: dying vnode on sync list\n");
}
Home |
Main Index |
Thread Index |
Old Index