summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_rman.c
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2002-09-05 11:45:02 +0000
committeriwasaki <iwasaki@FreeBSD.org>2002-09-05 11:45:02 +0000
commit9a172ee34ea00f64c6fd936e9b6ff608c612eaeb (patch)
tree018f9fa8bae11549c386505e687a23b3d56fdcfd /sys/kern/subr_rman.c
parentd5001c981822c37a37c8685f19c3b1a9d115439c (diff)
downloadFreeBSD-src-9a172ee34ea00f64c6fd936e9b6ff608c612eaeb.zip
FreeBSD-src-9a172ee34ea00f64c6fd936e9b6ff608c612eaeb.tar.gz
Add debug.rman_debug sysctl MIB and loader tunable instead of broken
RMAN_DEBUG option. This would be useful for debugging resource manager code.
Diffstat (limited to 'sys/kern/subr_rman.c')
-rw-r--r--sys/kern/subr_rman.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
index 7c5502e..858434b 100644
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -66,12 +66,14 @@
#include <sys/bus.h> /* XXX debugging */
#include <machine/bus.h>
#include <sys/rman.h>
+#include <sys/sysctl.h>
-#ifdef RMAN_DEBUG
-#define DPRINTF(params) printf##params
-#else
-#define DPRINTF(params)
-#endif
+int rman_debug = 0;
+TUNABLE_INT("debug.rman_debug", &rman_debug);
+SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RW,
+ &rman_debug, 0, "rman debug");
+
+#define DPRINTF(params) if (rman_debug) printf params
static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager");
OpenPOWER on IntegriCloud