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/compat/linux/linux_util.h | |
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/compat/linux/linux_util.h')
-rw-r--r-- | sys/compat/linux/linux_util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 2908a0f..6be0392 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -68,15 +68,23 @@ int linux_emul_convpath(struct thread *, const char *, enum uio_seg, char **, in #define LFREEPATH(path) free(path, M_TEMP) #define DUMMY(s) \ +LIN_SDT_PROBE_DEFINE0(dummy, s, entry); \ +LIN_SDT_PROBE_DEFINE0(dummy, s, not_implemented); \ +LIN_SDT_PROBE_DEFINE1(dummy, s, return, "int"); \ int \ linux_ ## s(struct thread *td, struct linux_ ## s ## _args *args) \ { \ static pid_t pid; \ \ + LIN_SDT_PROBE0(dummy, s, entry); \ + \ if (pid != td->td_proc->p_pid) { \ linux_msg(td, "syscall %s not implemented", #s); \ + LIN_SDT_PROBE0(dummy, s, not_implemented); \ pid = td->td_proc->p_pid; \ }; \ + \ + LIN_SDT_PROBE1(dummy, s, return, ENOSYS); \ return (ENOSYS); \ } \ struct __hack |