Commit 0d0dda27 authored by Balasubramani Vivekanandan's avatar Balasubramani Vivekanandan Committed by Rodrigo Vivi

drm/xe/trace: Optimize trace definition

Make use of EVENT_CLASS to group similar trace events
Signed-off-by: default avatarBalasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Reviewed-by: default avatarHaridhar Kalvala <haridhar.kalvala@intel.com>
Link: https://lore.kernel.org/intel-xe/20231019093140.1901665-3-balasubramani.vivekanandan@intel.com/Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 8656ea9a
......@@ -518,10 +518,10 @@ DEFINE_EVENT(xe_vm, xe_vm_rebind_worker_exit,
TP_ARGS(vm)
);
TRACE_EVENT(xe_guc_ct_h2g_flow_control,
/* GuC */
DECLARE_EVENT_CLASS(xe_guc_ct_flow_control,
TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
TP_ARGS(_head, _tail, size, space, len),
/* GuC */
TP_STRUCT__entry(
__field(u32, _head)
......@@ -539,32 +539,21 @@ TRACE_EVENT(xe_guc_ct_h2g_flow_control,
__entry->len = len;
),
TP_printk("head=%u, tail=%u, size=%u, space=%u, len=%u",
TP_printk("h2g flow control: head=%u, tail=%u, size=%u, space=%u, len=%u",
__entry->_head, __entry->_tail, __entry->size,
__entry->space, __entry->len)
);
TRACE_EVENT(xe_guc_ct_g2h_flow_control,
DEFINE_EVENT(xe_guc_ct_flow_control, xe_guc_ct_h2g_flow_control,
TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
TP_ARGS(_head, _tail, size, space, len),
TP_STRUCT__entry(
__field(u32, _head)
__field(u32, _tail)
__field(u32, size)
__field(u32, space)
__field(u32, len)
),
TP_ARGS(_head, _tail, size, space, len)
);
TP_fast_assign(
__entry->_head = _head;
__entry->_tail = _tail;
__entry->size = size;
__entry->space = space;
__entry->len = len;
),
DEFINE_EVENT_PRINT(xe_guc_ct_flow_control, xe_guc_ct_g2h_flow_control,
TP_PROTO(u32 _head, u32 _tail, u32 size, u32 space, u32 len),
TP_ARGS(_head, _tail, size, space, len),
TP_printk("head=%u, tail=%u, size=%u, space=%u, len=%u",
TP_printk("g2h flow control: head=%u, tail=%u, size=%u, space=%u, len=%u",
__entry->_head, __entry->_tail, __entry->size,
__entry->space, __entry->len)
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment