diff options
Diffstat (limited to 'include/trace/events/dlm.h')
-rw-r--r-- | include/trace/events/dlm.h | 63 |
1 files changed, 53 insertions, 10 deletions
diff --git a/include/trace/events/dlm.h b/include/trace/events/dlm.h index 37eb79e29b28..c1a146f9fc91 100644 --- a/include/trace/events/dlm.h +++ b/include/trace/events/dlm.h @@ -7,6 +7,7 @@ #include <linux/dlm.h> #include <linux/dlmconstants.h> +#include <uapi/linux/dlm_plock.h> #include <linux/tracepoint.h> #include "../../../fs/dlm/dlm_internal.h" @@ -47,16 +48,8 @@ { DLM_SBF_ALTMODE, "ALTMODE" }) #define show_lkb_flags(flags) __print_flags(flags, "|", \ - { DLM_IFL_MSTCPY, "MSTCPY" }, \ - { DLM_IFL_RESEND, "RESEND" }, \ - { DLM_IFL_DEAD, "DEAD" }, \ - { DLM_IFL_OVERLAP_UNLOCK, "OVERLAP_UNLOCK" }, \ - { DLM_IFL_OVERLAP_CANCEL, "OVERLAP_CANCEL" }, \ - { DLM_IFL_ENDOFLIFE, "ENDOFLIFE" }, \ - { DLM_IFL_DEADLOCK_CANCEL, "DEADLOCK_CANCEL" }, \ - { DLM_IFL_STUB_MS, "STUB_MS" }, \ - { DLM_IFL_USER, "USER" }, \ - { DLM_IFL_ORPHAN, "ORPHAN" }) + { BIT(DLM_DFL_USER_BIT), "USER" }, \ + { BIT(DLM_DFL_ORPHAN_BIT), "ORPHAN" }) #define show_header_cmd(cmd) __print_symbolic(cmd, \ { DLM_MSG, "MSG"}, \ @@ -593,6 +586,56 @@ TRACE_EVENT(dlm_recv_message, ); +DECLARE_EVENT_CLASS(dlm_plock_template, + + TP_PROTO(const struct dlm_plock_info *info), + + TP_ARGS(info), + + TP_STRUCT__entry( + __field(uint8_t, optype) + __field(uint8_t, ex) + __field(uint8_t, wait) + __field(uint8_t, flags) + __field(uint32_t, pid) + __field(int32_t, nodeid) + __field(int32_t, rv) + __field(uint32_t, fsid) + __field(uint64_t, number) + __field(uint64_t, start) + __field(uint64_t, end) + __field(uint64_t, owner) + ), + + TP_fast_assign( + __entry->optype = info->optype; + __entry->ex = info->ex; + __entry->wait = info->wait; + __entry->flags = info->flags; + __entry->pid = info->pid; + __entry->nodeid = info->nodeid; + __entry->rv = info->rv; + __entry->fsid = info->fsid; + __entry->number = info->number; + __entry->start = info->start; + __entry->end = info->end; + __entry->owner = info->owner; + ), + + TP_printk("fsid=%u number=%llx owner=%llx optype=%d ex=%d wait=%d flags=%x pid=%u nodeid=%d rv=%d start=%llx end=%llx", + __entry->fsid, __entry->number, __entry->owner, + __entry->optype, __entry->ex, __entry->wait, + __entry->flags, __entry->pid, __entry->nodeid, + __entry->rv, __entry->start, __entry->end) + +); + +DEFINE_EVENT(dlm_plock_template, dlm_plock_read, + TP_PROTO(const struct dlm_plock_info *info), TP_ARGS(info)); + +DEFINE_EVENT(dlm_plock_template, dlm_plock_write, + TP_PROTO(const struct dlm_plock_info *info), TP_ARGS(info)); + TRACE_EVENT(dlm_send, TP_PROTO(int nodeid, int ret), |