diff options
author | netchild <netchild@FreeBSD.org> | 2012-05-05 19:42:38 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2012-05-05 19:42:38 +0000 |
commit | 9895b5ca9df1f0d045ee00e77007e80d4c202ca4 (patch) | |
tree | 2c944ca220ef9f94f80b967133cbd2ab53caa81c /sys/i386/linux | |
parent | 096ede817a595e57dafce2910385344f389c8dbd (diff) | |
download | FreeBSD-src-9895b5ca9df1f0d045ee00e77007e80d4c202ca4.zip FreeBSD-src-9895b5ca9df1f0d045ee00e77007e80d4c202ca4.tar.gz |
- >500 static DTrace probes for the linuxulator
- DTrace scripts to check for errors, performance, ...
they serve mostly as examples of what you can do with the static probe;s
with moderate load the scripts may be overwhelmed, excessive lock-tracing
may influence program behavior (see the last design decission)
Design decissions:
- use "linuxulator" as the provider for the native bitsize; add the
bitsize for the non-native emulation (e.g. "linuxuator32" on amd64)
- Add probes only for locks which are acquired in one function and released
in another function. Locks which are aquired and released in the same
function should be easy to pair in the code, inter-function
locking is more easy to verify in DTrace.
- Probes for locks should be fired after locking and before releasing to
prevent races (to provide data/function stability in DTrace, see the
man-page of "dtrace -v ..." and the corresponding DTrace docs).
Diffstat (limited to 'sys/i386/linux')
-rw-r--r-- | sys/i386/linux/linux.h | 1 | ||||
-rw-r--r-- | sys/i386/linux/linux_dummy.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 8b5bcbf..799259c 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -42,6 +42,7 @@ extern u_char linux_debug_map[]; #define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) #define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)td->td_proc->p_pid #define LMSG(fmt) "linux(%ld): "fmt"\n", (long)td->td_proc->p_pid +#define LINUX_DTRACE linuxulator #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_LINUX); diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c index 31bbf6f..ab77790 100644 --- a/sys/i386/linux/linux_dummy.c +++ b/sys/i386/linux/linux_dummy.c @@ -29,14 +29,23 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_compat.h" +#include "opt_kdtrace.h" + #include <sys/param.h> +#include <sys/kernel.h> +#include <sys/sdt.h> #include <sys/systm.h> #include <sys/proc.h> #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> +#include <compat/linux/linux_dtrace.h> #include <compat/linux/linux_util.h> +/* DTrace init */ +LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); + DUMMY(stime); DUMMY(fstat); DUMMY(olduname); |