Module Name: src
Committed By: pooka
Date: Mon Dec 9 17:57:11 UTC 2013
Modified Files:
src/sys/rump: Makefile.rump
src/sys/rump/librump/rumpkern: Makefile.rumpkern rump.c
src/sys/rump/librump/rumpvfs: Makefile.rumpvfs
Log Message:
Make ktrace a compile-time option
To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/rump/Makefile.rump
cvs rdiff -u -r1.133 -r1.134 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.279 -r1.280 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.37 -r1.38 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.88 src/sys/rump/Makefile.rump:1.89
--- src/sys/rump/Makefile.rump:1.88 Mon Dec 9 16:54:20 2013
+++ src/sys/rump/Makefile.rump Mon Dec 9 17:57:11 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rump,v 1.88 2013/12/09 16:54:20 pooka Exp $
+# $NetBSD: Makefile.rump,v 1.89 2013/12/09 17:57:11 pooka Exp $
#
WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet
@@ -24,7 +24,6 @@ CFLAGS+= -ffreestanding -fno-strict-alia
CWARNFLAGS+= -Wno-format-zero-length -Wno-pointer-sign
CPPFLAGS+= -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR
CPPFLAGS+= -DDEBUGPRINT
-CPPFLAGS+= -DKTRACE
CPPFLAGS+= -I${.CURDIR} -I.
CPPFLAGS+= -I${RUMPTOP}/../../common/include
CPPFLAGS+= -I${RUMPTOP}/include
@@ -63,6 +62,11 @@ CPPFLAGS+= -DDEBUG
CPPFLAGS+= -DLOCKDEBUG
.endif
+RUMP_KTRACE?=yes
+.if ${RUMP_KTRACE} == "yes"
+CPPFLAGS+= -DKTRACE
+.endif
+
# kernel libs should not get linked against libc
# XXX: actually, we would like to enable this but cannot, since it
# also leaves out libgcc, it causes problems on some platforms.
Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.133 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.134
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.133 Mon Dec 9 16:54:20 2013
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Mon Dec 9 17:57:11 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpkern,v 1.133 2013/12/09 16:54:20 pooka Exp $
+# $NetBSD: Makefile.rumpkern,v 1.134 2013/12/09 17:57:11 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -76,7 +76,6 @@ SRCS+= init_sysctl_base.c \
kern_event.c \
kern_hook.c \
kern_ksyms.c \
- kern_ktrace.c \
kern_malloc.c \
kern_module.c \
kern_mutex_obj.c \
@@ -159,6 +158,10 @@ SRCS+= subr_kmem.c subr_pool.c
SRCS+= subr_lockdebug.c
.endif
+.if ${RUMP_KTRACE} == "yes"
+SRCS+= kern_ktrace.c
+.endif
+
# no shlib_version because this is automatically in sync with lib/librump
SHLIB_MAJOR= 0
SHLIB_MINOR= 0
Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.279 src/sys/rump/librump/rumpkern/rump.c:1.280
--- src/sys/rump/librump/rumpkern/rump.c:1.279 Mon Dec 9 16:56:11 2013
+++ src/sys/rump/librump/rumpkern/rump.c Mon Dec 9 17:57:11 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.279 2013/12/09 16:56:11 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.280 2013/12/09 17:57:11 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.279 2013/12/09 16:56:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.280 2013/12/09 17:57:11 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -371,7 +371,9 @@ rump_init(void)
inittimecounter();
ntp_init();
+#ifdef KTRACE
ktrinit();
+#endif
ts = boottime;
tc_setclock(&ts);
Index: src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
diff -u src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.37 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.38
--- src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.37 Mon Dec 9 16:54:20 2013
+++ src/sys/rump/librump/rumpvfs/Makefile.rumpvfs Mon Dec 9 17:57:11 2013
@@ -1,6 +1,10 @@
-# $NetBSD: Makefile.rumpvfs,v 1.37 2013/12/09 16:54:20 pooka Exp $
+# $NetBSD: Makefile.rumpvfs,v 1.38 2013/12/09 17:57:11 pooka Exp $
#
+.include "${RUMPTOP}/Makefile.rump"
+
+.include <bsd.own.mk>
+
LIB= rumpvfs
.PATH: ${RUMPTOP}/librump/rumpvfs ${RUMPTOP}/librump \
@@ -50,7 +54,9 @@ SRCS+= subr_bufq.c bufq_disksort.c bufq_
SRCS+= mfs_miniroot.c
# ktrace vfs part
+.if ${RUMP_KTRACE} == "yes"
SRCS+= kern_ktrace_vfs.c
+.endif
#quota2 plists
SRCS+= quota1_subr.c vfs_quotactl.c
@@ -70,7 +76,5 @@ SHLIB_MINOR= 0
CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
-.include "${RUMPTOP}/Makefile.rump"
-
.include <bsd.lib.mk>
.include <bsd.klinks.mk>