Module Name: src
Committed By: pooka
Date: Sun May 3 16:52:55 UTC 2009
Modified Files:
src/sys/kern: vfs_subr.c
src/sys/sys: buf.h vnode.h
src/sys/uvm: uvm_ddb.h uvm_map.c
Log Message:
Include some debug print routines if DEBUGPRINT is defined. This
way they can be included without having to include DDB.
(arguably all print routines should be behind #ifdef DEBUGPRINT
and options DDB should define that macro, but I'll tackle that later)
To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/sys/kern/vfs_subr.c
cvs rdiff -u -r1.111 -r1.112 src/sys/sys/buf.h
cvs rdiff -u -r1.205 -r1.206 src/sys/sys/vnode.h
cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/uvm_ddb.h
cvs rdiff -u -r1.269 -r1.270 src/sys/uvm/uvm_map.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.377 src/sys/kern/vfs_subr.c:1.378
--- src/sys/kern/vfs_subr.c:1.377 Wed Apr 29 15:44:55 2009
+++ src/sys/kern/vfs_subr.c Sun May 3 16:52:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.377 2009/04/29 15:44:55 dyoung Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.378 2009/05/03 16:52:54 pooka Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.377 2009/04/29 15:44:55 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.378 2009/05/03 16:52:54 pooka Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -3077,7 +3077,7 @@
return error;
}
-#ifdef DDB
+#if defined(DDB) || defined(DEBUGPRINT)
static const char buf_flagbits[] = BUF_FLAGBITS;
void
@@ -3225,5 +3225,5 @@
(*pr)("\n", vp);
}
}
-#endif /* DDB */
+#endif /* DDB || DEBUGPRINT */
Index: src/sys/sys/buf.h
diff -u src/sys/sys/buf.h:1.111 src/sys/sys/buf.h:1.112
--- src/sys/sys/buf.h:1.111 Sun Feb 22 20:28:06 2009
+++ src/sys/sys/buf.h Sun May 3 16:52:55 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.111 2009/02/22 20:28:06 ad Exp $ */
+/* $NetBSD: buf.h,v 1.112 2009/05/03 16:52:55 pooka Exp $ */
/*-
* Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -311,7 +311,7 @@
u_long buf_memcalc(void);
int buf_drain(int);
int buf_setvalimit(vsize_t);
-#ifdef DDB
+#if defined(DDB) || defined(DEBUGPRINT)
void vfs_buf_print(buf_t *, int, void (*)(const char *, ...));
#endif
buf_t *getiobuf(struct vnode *, bool);
Index: src/sys/sys/vnode.h
diff -u src/sys/sys/vnode.h:1.205 src/sys/sys/vnode.h:1.206
--- src/sys/sys/vnode.h:1.205 Wed Apr 22 22:57:08 2009
+++ src/sys/sys/vnode.h Sun May 3 16:52:55 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode.h,v 1.205 2009/04/22 22:57:08 elad Exp $ */
+/* $NetBSD: vnode.h,v 1.206 2009/05/03 16:52:55 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -659,7 +659,7 @@
void vfs_getnewfsid(struct mount *);
int vfs_drainvnodes(long target, struct lwp *);
void vfs_timestamp(struct timespec *);
-#ifdef DDB
+#if defined(DDB) || defined(DEBUGPRINT)
void vfs_vnode_print(struct vnode *, int, void (*)(const char *, ...));
void vfs_mount_print(struct mount *, int, void (*)(const char *, ...));
#endif /* DDB */
Index: src/sys/uvm/uvm_ddb.h
diff -u src/sys/uvm/uvm_ddb.h:1.12 src/sys/uvm/uvm_ddb.h:1.13
--- src/sys/uvm/uvm_ddb.h:1.12 Fri Aug 8 17:09:28 2008
+++ src/sys/uvm/uvm_ddb.h Sun May 3 16:52:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_ddb.h,v 1.12 2008/08/08 17:09:28 skrll Exp $ */
+/* $NetBSD: uvm_ddb.h,v 1.13 2009/05/03 16:52:54 pooka Exp $ */
/*
*
@@ -39,7 +39,7 @@
#ifdef _KERNEL
-#ifdef DDB
+#if defined(DDB) || defined(DEBUGPRINT)
void uvm_map_printit(struct vm_map *, bool,
void (*)(const char *, ...));
void uvm_object_printit(struct uvm_object *, bool,
@@ -49,7 +49,7 @@
void uvm_page_printall(void (*)(const char *, ...));
void uvmexp_print(void (*)(const char *, ...));
void uvmhist_print(void (*)(const char *, ...));
-#endif /* DDB */
+#endif /* DDB || DEBUGPRINT */
#endif /* _KERNEL */
Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.269 src/sys/uvm/uvm_map.c:1.270
--- src/sys/uvm/uvm_map.c:1.269 Tue Jan 13 14:04:35 2009
+++ src/sys/uvm/uvm_map.c Sun May 3 16:52:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_map.c,v 1.269 2009/01/13 14:04:35 yamt Exp $ */
+/* $NetBSD: uvm_map.c,v 1.270 2009/05/03 16:52:54 pooka Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.269 2009/01/13 14:04:35 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.270 2009/05/03 16:52:54 pooka Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -96,7 +96,7 @@
#include <uvm/uvm.h>
-#ifdef DDB
+#if defined(DDB) || defined(DEBUGPRINT)
#include <uvm/uvm_ddb.h>
#endif
@@ -4934,7 +4934,7 @@
return merged;
}
-#if defined(DDB)
+#if defined(DDB) || defined(DEBUGPRINT)
/*
* DDB hooks
@@ -5257,7 +5257,7 @@
return false;
}
-#if defined(DDB)
+#if defined(DDB) || defined(DEBUGPRINT)
void
uvm_whatis(uintptr_t addr, void (*pr)(const char *, ...))
{
@@ -5278,4 +5278,4 @@
map = entry->object.sub_map;
}
}
-#endif /* defined(DDB) */
+#endif /* defined(DDB) || defined(DEBUGPRINT) */