Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump Make ktrace a compile-time option



details:   https://anonhg.NetBSD.org/src/rev/f07193c48575
branches:  trunk
changeset: 325169:f07193c48575
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Dec 09 17:57:11 2013 +0000

description:
Make ktrace a compile-time option

diffstat:

 sys/rump/Makefile.rump                      |   8 ++++++--
 sys/rump/librump/rumpkern/Makefile.rumpkern |   7 +++++--
 sys/rump/librump/rumpkern/rump.c            |   6 ++++--
 sys/rump/librump/rumpvfs/Makefile.rumpvfs   |  10 +++++++---
 4 files changed, 22 insertions(+), 9 deletions(-)

diffs (118 lines):

diff -r 029f0a6dfd94 -r f07193c48575 sys/rump/Makefile.rump
--- a/sys/rump/Makefile.rump    Mon Dec 09 17:43:58 2013 +0000
+++ b/sys/rump/Makefile.rump    Mon Dec 09 17:57:11 2013 +0000
@@ -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 @@
 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+=     -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.
diff -r 029f0a6dfd94 -r f07193c48575 sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern       Mon Dec 09 17:43:58 2013 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern       Mon Dec 09 17:57:11 2013 +0000
@@ -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 @@
        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_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
diff -r 029f0a6dfd94 -r f07193c48575 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Mon Dec 09 17:43:58 2013 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Mon Dec 09 17:57:11 2013 +0000
@@ -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 @@
        inittimecounter();
        ntp_init();
 
+#ifdef KTRACE
        ktrinit();
+#endif
 
        ts = boottime;
        tc_setclock(&ts);
diff -r 029f0a6dfd94 -r f07193c48575 sys/rump/librump/rumpvfs/Makefile.rumpvfs
--- a/sys/rump/librump/rumpvfs/Makefile.rumpvfs Mon Dec 09 17:43:58 2013 +0000
+++ b/sys/rump/librump/rumpvfs/Makefile.rumpvfs Mon Dec 09 17:57:11 2013 +0000
@@ -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+= 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 @@
 
 CPPFLAGS+=     -I${RUMPTOP}/librump/rumpkern
 
-.include "${RUMPTOP}/Makefile.rump"
-
 .include <bsd.lib.mk>
 .include <bsd.klinks.mk>



Home | Main Index | Thread Index | Old Index