Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys add dtrace syscall glue:
details: https://anonhg.NetBSD.org/src/rev/78a7cd5a45c3
branches: trunk
changeset: 806741:78a7cd5a45c3
user: christos <christos%NetBSD.org@localhost>
date: Sat Mar 07 16:34:55 2015 +0000
description:
add dtrace syscall glue:
- adds 2 members to sysent: these are the entry and exit probe ids
they are non-zero only when dtrace is loaded
- add an emul specific probe for dtrace: this is NULL unless the emulation
supports dtrace and is loaded
- adjust the syscall stub call trace_enter/exit if needed for systrace
- add more info to trace_enter and exit needed by systrace
diffstat:
sys/sys/param.h | 4 ++--
sys/sys/proc.h | 7 ++++++-
sys/sys/systm.h | 10 +++++++---
3 files changed, 15 insertions(+), 6 deletions(-)
diffs (77 lines):
diff -r 1fecadbb5546 -r 78a7cd5a45c3 sys/sys/param.h
--- a/sys/sys/param.h Sat Mar 07 15:49:20 2015 +0000
+++ b/sys/sys/param.h Sat Mar 07 16:34:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.465 2015/02/14 12:59:02 he Exp $ */
+/* $NetBSD: param.h,v 1.466 2015/03/07 16:34:55 christos Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
* 2.99.9 (299000900)
*/
-#define __NetBSD_Version__ 799000500 /* NetBSD 7.99.5 */
+#define __NetBSD_Version__ 799000600 /* NetBSD 7.99.6 */
#define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
(m) * 1000000) + (p) * 100) <= __NetBSD_Version__)
diff -r 1fecadbb5546 -r 78a7cd5a45c3 sys/sys/proc.h
--- a/sys/sys/proc.h Sat Mar 07 15:49:20 2015 +0000
+++ b/sys/sys/proc.h Sat Mar 07 16:34:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.320 2014/02/21 22:06:48 skrll Exp $ */
+/* $NetBSD: proc.h,v 1.321 2015/03/07 16:34:55 christos Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -177,6 +177,11 @@
size_t e_ucsize; /* size of ucontext_t */
void (*e_startlwp)(void *);
+
+ /* Dtrace syscall probe */
+ void (*e_dtrace_syscall)(uint32_t, register_t,
+ const struct sysent *, const void *,
+ const register_t *, int);
};
/*
diff -r 1fecadbb5546 -r 78a7cd5a45c3 sys/sys/systm.h
--- a/sys/sys/systm.h Sat Mar 07 15:49:20 2015 +0000
+++ b/sys/sys/systm.h Sat Mar 07 16:34:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: systm.h,v 1.266 2014/08/03 12:49:32 wiz Exp $ */
+/* $NetBSD: systm.h,v 1.267 2015/03/07 16:34:55 christos Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@@ -57,6 +57,7 @@
struct clockframe;
struct lwp;
struct proc;
+struct sysent;
struct timeval;
struct tty;
struct uio;
@@ -120,6 +121,8 @@
short sy_argsize; /* total size of arguments */
int sy_flags; /* flags. see below */
sy_call_t *sy_call; /* implementing function */
+ uint32_t sy_entry; /* DTrace entry ID for systrace. */
+ uint32_t sy_return; /* DTrace return ID for systrace. */
} sysent[];
extern int nsysent;
#if BYTE_ORDER == BIG_ENDIAN
@@ -388,8 +391,9 @@
*/
#ifdef _KERNEL
bool trace_is_enabled(struct proc *);
-int trace_enter(register_t, const register_t *, int);
-void trace_exit(register_t, register_t [], int);
+int trace_enter(register_t, const struct sysent *, const void *);
+void trace_exit(register_t, const struct sysent *, const void *,
+ register_t [], int);
#endif
int uiomove(void *, size_t, struct uio *);
Home |
Main Index |
Thread Index |
Old Index