diff --git a/kmod/src/scoutfs_trace.h b/kmod/src/scoutfs_trace.h index 48430a6f..7d3901dc 100644 --- a/kmod/src/scoutfs_trace.h +++ b/kmod/src/scoutfs_trace.h @@ -1957,9 +1957,8 @@ TRACE_EVENT(ocfs2_cluster_lock, TP_ARGS(osb, lockres, requested, lkm_flags, arg_flags), TP_STRUCT__entry( - __field(char *, lockspace) - __field(int, lockspace_len) - __field(char *, lockname) + __string(lockspace, osb->cconn->cc_name) + __string(lockname, lockres->l_pretty_name) __field(int, requested) __field(unsigned int, lkm_flags) __field(unsigned int, arg_flags) @@ -1972,9 +1971,8 @@ TRACE_EVENT(ocfs2_cluster_lock, ), TP_fast_assign( - __entry->lockspace = osb->cconn->cc_name; - __entry->lockspace_len = osb->cconn->cc_namelen; - __entry->lockname = lockres->l_pretty_name; + __assign_str(lockspace, osb->cconn->cc_name); + __assign_str(lockname, lockres->l_pretty_name); __entry->requested = requested; __entry->lkm_flags = lkm_flags; __entry->arg_flags = arg_flags; @@ -1986,11 +1984,12 @@ TRACE_EVENT(ocfs2_cluster_lock, __entry->ex_holders = lockres->l_ex_holders; ), - TP_printk("lockspace %.*s lock %s requested %d lkm_flags 0x%x arg_flags 0x%x lockres->level %d lockres->flags 0x%x lockres->blocking %d holders cw/pr/ex %u/%u/%u", - __entry->lockspace_len, __entry->lockspace, __entry->lockname, - __entry->requested, __entry->lkm_flags, __entry->arg_flags, - __entry->lockres_level, __entry->lockres_flags, __entry->blocking, - __entry->cw_holders, __entry->pr_holders, __entry->ex_holders) + TP_printk("lockspace %s lock %s requested %d lkm_flags 0x%x arg_flags 0x%x lockres->level %d lockres->flags 0x%x lockres->blocking %d holders cw/pr/ex %u/%u/%u", + __get_str(lockspace), __get_str(lockname), __entry->requested, + __entry->lkm_flags, __entry->arg_flags, + __entry->lockres_level, __entry->lockres_flags, + __entry->blocking, __entry->cw_holders, __entry->pr_holders, + __entry->ex_holders) ); TRACE_EVENT(ocfs2_cluster_unlock, @@ -2000,9 +1999,8 @@ TRACE_EVENT(ocfs2_cluster_unlock, TP_ARGS(osb, lockres, level), TP_STRUCT__entry( - __field(char *, lockspace) - __field(int, lockspace_len) - __field(char *, lockname) + __string(lockspace, osb->cconn->cc_name) + __string(lockname, lockres->l_pretty_name) __field(int, level) __field(unsigned int, lockres_flags) __field(int, lockres_level) @@ -2013,9 +2011,8 @@ TRACE_EVENT(ocfs2_cluster_unlock, ), TP_fast_assign( - __entry->lockspace = osb->cconn->cc_name; - __entry->lockspace_len = osb->cconn->cc_namelen; - __entry->lockname = lockres->l_pretty_name; + __assign_str(lockspace, osb->cconn->cc_name); + __assign_str(lockname, lockres->l_pretty_name); __entry->level = level; __entry->lockres_flags = lockres->l_flags; __entry->lockres_level = lockres->l_level; @@ -2025,11 +2022,11 @@ TRACE_EVENT(ocfs2_cluster_unlock, __entry->ex_holders = lockres->l_ex_holders; ), - TP_printk("lockspace %.*s lock %s level %d lockres->level %d lockres->flags 0x%x lockres->blocking %d holders cw/pr/ex: %u/%u/%u", - __entry->lockspace_len, __entry->lockspace, __entry->lockname, - __entry->level, __entry->lockres_level, __entry->lockres_flags, - __entry->blocking, __entry->cw_holders, __entry->pr_holders, - __entry->ex_holders) + TP_printk("lockspace %s lock %s level %d lockres->level %d lockres->flags 0x%x lockres->blocking %d holders cw/pr/ex: %u/%u/%u", + __get_str(lockspace), __get_str(lockname), __entry->level, + __entry->lockres_level, __entry->lockres_flags, + __entry->blocking, __entry->cw_holders, __entry->pr_holders, + __entry->ex_holders) ); DECLARE_EVENT_CLASS(ocfs2_lock_res_class, @@ -2038,9 +2035,8 @@ DECLARE_EVENT_CLASS(ocfs2_lock_res_class, TP_ARGS(osb, lockres), TP_STRUCT__entry( - __field(char *, lockspace) - __field(int, lockspace_len) - __field(char *, lockname) + __string(lockspace, osb->cconn->cc_name) + __string(lockname, lockres->l_pretty_name) __field(unsigned int, lockres_flags) __field(int, lockres_level) __field(int, blocking) @@ -2050,9 +2046,8 @@ DECLARE_EVENT_CLASS(ocfs2_lock_res_class, ), TP_fast_assign( - __entry->lockspace = osb->cconn->cc_name; - __entry->lockspace_len = osb->cconn->cc_namelen; - __entry->lockname = lockres->l_pretty_name; + __assign_str(lockspace, osb->cconn->cc_name); + __assign_str(lockname, lockres->l_pretty_name); __entry->lockres_flags = lockres->l_flags; __entry->lockres_level = lockres->l_level; __entry->blocking = lockres->l_blocking; @@ -2061,10 +2056,11 @@ DECLARE_EVENT_CLASS(ocfs2_lock_res_class, __entry->ex_holders = lockres->l_ex_holders; ), - TP_printk("lockspace %.*s lock %s lockres->level %d lockres->flags 0x%x lockres->blocking %d holders cw/pr/ex: %u/%u/%u", - __entry->lockspace_len, __entry->lockspace, __entry->lockname, - __entry->lockres_level, __entry->lockres_flags, __entry->blocking, - __entry->cw_holders, __entry->pr_holders, __entry->ex_holders) + TP_printk("lockspace %s lock %s lockres->level %d lockres->flags 0x%x lockres->blocking %d holders cw/pr/ex: %u/%u/%u", + __get_str(lockspace), __get_str(lockname), + __entry->lockres_level, __entry->lockres_flags, + __entry->blocking, __entry->cw_holders, + __entry->pr_holders, __entry->ex_holders) ); DEFINE_EVENT(ocfs2_lock_res_class, ocfs2_simple_drop_lockres,