diff options
author | Matthew Macy <[email protected]> | 2020-02-18 11:21:37 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-18 11:21:37 -0800 |
commit | 8b3547a481a74b39c5d0eed256896fb25e8310e9 (patch) | |
tree | eefb8c2d64b7246ca5f7559fece72838e7b76f88 /include | |
parent | f2448464623f240002a0dff0f4617dec4c2cdefe (diff) |
Factor out some dbuf subroutines and add state change tracing
Create dedicated dbuf_read_hole and dbuf_read_bonus.
Additionally, add a dtrace probe to allow state change tracing.
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Will Andrews <[email protected]>
Reviewed by: Brad Lewis <[email protected]>
Authored-by: Will Andrews <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9923
Diffstat (limited to 'include')
-rw-r--r-- | include/os/linux/zfs/sys/trace_dbuf.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/os/linux/zfs/sys/trace_dbuf.h b/include/os/linux/zfs/sys/trace_dbuf.h index fb12e2854..bd7d791a4 100644 --- a/include/os/linux/zfs/sys/trace_dbuf.h +++ b/include/os/linux/zfs/sys/trace_dbuf.h @@ -107,6 +107,14 @@ DECLARE_EVENT_CLASS(zfs_dbuf_class, TP_fast_assign(DBUF_TP_FAST_ASSIGN), TP_printk("%s", __get_str(msg)) ); + +DECLARE_EVENT_CLASS(zfs_dbuf_state_class, + TP_PROTO(dmu_buf_impl_t *db, const char *why), + TP_ARGS(db, why), + TP_STRUCT__entry(DBUF_TP_STRUCT_ENTRY), + TP_fast_assign(DBUF_TP_FAST_ASSIGN), + TP_printk("%s", __get_str(msg)) +); /* END CSTYLED */ /* BEGIN CSTYLED */ @@ -118,6 +126,14 @@ DEFINE_EVENT(zfs_dbuf_class, name, \ DEFINE_DBUF_EVENT(zfs_blocked__read); /* BEGIN CSTYLED */ +#define DEFINE_DBUF_STATE_EVENT(name) \ +DEFINE_EVENT(zfs_dbuf_state_class, name, \ + TP_PROTO(dmu_buf_impl_t *db, const char *why), \ + TP_ARGS(db, why)) +/* END CSTYLED */ +DEFINE_DBUF_STATE_EVENT(zfs_dbuf__state_change); + +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class, TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), TP_ARGS(db, mls), @@ -147,6 +163,7 @@ DEFINE_DBUF_EVICT_ONE_EVENT(zfs_dbuf__evict__one); DEFINE_DTRACE_PROBE2(blocked__read); DEFINE_DTRACE_PROBE2(dbuf__evict__one); +DEFINE_DTRACE_PROBE2(dbuf__state_change); #endif /* HAVE_DECLARE_EVENT_CLASS */ #endif /* _KERNEL */ |