diff options
author | George V. Neville-Neil <gnn@FreeBSD.org> | 2012-07-11 16:27:02 +0000 |
---|---|---|
committer | George V. Neville-Neil <gnn@FreeBSD.org> | 2012-07-11 16:27:02 +0000 |
commit | 3fac94ba94c10f192ece041a0490aa8b63f0a6be (patch) | |
tree | eabb05d032e7a979640db2928991f11bb1d8758f /sys/sys/dtrace_bsd.h | |
parent | f5afad7389ba999eb7552549c19f6b76b1d77124 (diff) | |
download | src-3fac94ba94c10f192ece041a0490aa8b63f0a6be.tar.gz src-3fac94ba94c10f192ece041a0490aa8b63f0a6be.zip |
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
Notes
Notes:
svn path=/head/; revision=238366
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 eb348b28f184..2198b264db2f 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 |