Module Name:    src
Committed By:   pooka
Date:           Mon Dec  9 16:54:21 UTC 2013

Modified Files:
        src/sys/rump: Makefile.rump
        src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c locks.c rump.c
        src/sys/rump/librump/rumpvfs: Makefile.rumpvfs

Log Message:
Support ktrace for rump kernels.

Requested by Justin Cormack on rumpkernel-users.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/rump/Makefile.rump
cvs rdiff -u -r1.132 -r1.133 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.158 -r1.159 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.65 -r1.66 src/sys/rump/librump/rumpkern/locks.c
cvs rdiff -u -r1.277 -r1.278 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.36 -r1.37 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.87 src/sys/rump/Makefile.rump:1.88
--- src/sys/rump/Makefile.rump:1.87	Tue Sep  3 19:57:02 2013
+++ src/sys/rump/Makefile.rump	Mon Dec  9 16:54:20 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.87 2013/09/03 19:57:02 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.88 2013/12/09 16:54:20 pooka Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -24,6 +24,7 @@ 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

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.132 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.133
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.132	Sat Sep  7 17:58:00 2013
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Mon Dec  9 16:54:20 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.132 2013/09/07 17:58:00 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.133 2013/12/09 16:54:20 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -76,6 +76,7 @@ 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	\

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.158 src/sys/rump/librump/rumpkern/emul.c:1.159
--- src/sys/rump/librump/rumpkern/emul.c:1.158	Tue Apr 30 16:03:44 2013
+++ src/sys/rump/librump/rumpkern/emul.c	Mon Dec  9 16:54:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.158 2013/04/30 16:03:44 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.159 2013/12/09 16:54:20 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.158 2013/04/30 16:03:44 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.159 2013/12/09 16:54:20 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/null.h>
@@ -281,20 +281,6 @@ syscall_intern(struct proc *p)
 }
 #endif
 
-int
-trace_enter(register_t code, const register_t *args, int narg)
-{
-
-	return 0;
-}
-
-void
-trace_exit(register_t code, register_t rval[], int error)
-{
-
-	/* nada */
-}
-
 #ifdef LOCKDEBUG
 void
 turnstile_print(volatile void *obj, void (*pr)(const char *, ...))

Index: src/sys/rump/librump/rumpkern/locks.c
diff -u src/sys/rump/librump/rumpkern/locks.c:1.65 src/sys/rump/librump/rumpkern/locks.c:1.66
--- src/sys/rump/librump/rumpkern/locks.c:1.65	Wed Jul  3 17:10:28 2013
+++ src/sys/rump/librump/rumpkern/locks.c	Mon Dec  9 16:54:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: locks.c,v 1.65 2013/07/03 17:10:28 njoly Exp $	*/
+/*	$NetBSD: locks.c,v 1.66 2013/12/09 16:54:20 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.65 2013/07/03 17:10:28 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.66 2013/12/09 16:54:20 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -55,6 +55,9 @@ static lockops_t rw_lockops = {
 	NULL
 };
 
+/* not used, but need the symbols for pointer comparisons */
+syncobj_t mutex_syncobj, rw_syncobj;
+
 #define ALLOCK(lock, ops)		\
     lockdebug_alloc(lock, ops, (uintptr_t)__builtin_return_address(0))
 #define FREELOCK(lock)			\

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.277 src/sys/rump/librump/rumpkern/rump.c:1.278
--- src/sys/rump/librump/rumpkern/rump.c:1.277	Mon Dec  9 16:23:10 2013
+++ src/sys/rump/librump/rumpkern/rump.c	Mon Dec  9 16:54:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.277 2013/12/09 16:23:10 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.278 2013/12/09 16:54:20 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.277 2013/12/09 16:23:10 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.278 2013/12/09 16:54:20 pooka Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -370,6 +370,8 @@ rump_init(void)
 	inittimecounter();
 	ntp_init();
 
+	ktrinit();
+
 	ts = boottime;
 	tc_setclock(&ts);
 

Index: src/sys/rump/librump/rumpvfs/Makefile.rumpvfs
diff -u src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.36 src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.37
--- src/sys/rump/librump/rumpvfs/Makefile.rumpvfs:1.36	Fri Mar 15 12:09:59 2013
+++ src/sys/rump/librump/rumpvfs/Makefile.rumpvfs	Mon Dec  9 16:54:20 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpvfs,v 1.36 2013/03/15 12:09:59 pooka Exp $
+#	$NetBSD: Makefile.rumpvfs,v 1.37 2013/12/09 16:54:20 pooka Exp $
 #
 
 LIB=	rumpvfs
@@ -49,6 +49,9 @@ SRCS+=	subr_bufq.c bufq_disksort.c bufq_
 # MFS miniroot support
 SRCS+=	mfs_miniroot.c
 
+# ktrace vfs part
+SRCS+= kern_ktrace_vfs.c
+
 #quota2 plists
 SRCS+= quota1_subr.c vfs_quotactl.c
 

Reply via email to