diff options
author | gnn <gnn@FreeBSD.org> | 2012-07-11 16:27:02 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2012-07-11 16:27:02 +0000 |
commit | 786ac825530572ff02b9440ed00f28096197f9b9 (patch) | |
tree | eabb05d032e7a979640db2928991f11bb1d8758f /sys/sys/dtrace_bsd.h | |
parent | ec38b41c3eecfc3b4fb8ebfac57ad414dd1aa654 (diff) | |
download | FreeBSD-src-786ac825530572ff02b9440ed00f28096197f9b9.zip FreeBSD-src-786ac825530572ff02b9440ed00f28096197f9b9.tar.gz |
Initial commit of an I/O provider for DTrace on FreeBSD.
These probes are most useful when looking into the structures
they provide, which are listed in io.d. For example:
dtrace -n 'io:genunix::start { printf("%d\n", args[0]->bio_bcount); }'
Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently
different that there is not a 1:1 mapping from scripts that work
with one to the other.
MFC after: 1 month
Diffstat (limited to 'sys/sys/dtrace_bsd.h')
-rw-r--r-- | sys/sys/dtrace_bsd.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/sys/dtrace_bsd.h b/sys/sys/dtrace_bsd.h index eb348b2..2198b26 100644 --- a/sys/sys/dtrace_bsd.h +++ b/sys/sys/dtrace_bsd.h @@ -38,6 +38,8 @@ struct thread; struct vattr; struct vnode; struct reg; +struct devstat; +struct bio; /* * Cyclic clock function type definition used to hook the cyclic @@ -168,6 +170,23 @@ extern dtrace_nfsclient_nfs23_done_probe_func_t extern dtrace_nfsclient_nfs23_done_probe_func_t dtrace_nfscl_nfs234_done_probe; +/* IO Provider hooks, really hook into devstat */ +typedef void (*dtrace_io_start_probe_func_t)(uint32_t, struct bio *, + struct devstat *); +extern dtrace_io_start_probe_func_t dtrace_io_start_probe; + +typedef void (*dtrace_io_done_probe_func_t)(uint32_t, struct bio *, + struct devstat *); +extern dtrace_io_done_probe_func_t dtrace_io_done_probe; + +typedef void (*dtrace_io_wait_start_probe_func_t)(uint32_t, uintptr_t *, + struct devstat *); +extern dtrace_io_wait_start_probe_func_t dtrace_io_wait_start_probe; + +typedef void (*dtrace_io_wait_done_probe_func_t)(uint32_t, uintptr_t *, + struct devstat *); +extern dtrace_io_wait_done_probe_func_t dtrace_io_wait_done_probe; + /* * Functions which allow the dtrace module to check that the kernel * hooks have been compiled with sufficient space for it's private |