diff options
author | Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> | 2023-10-19 12:31:39 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:43:19 +0300 |
commit | 8656ea9ae8b488ac25fdd332c60e6fd805cde171 (patch) | |
tree | 9fe719b7fb29b6ecebd70d3be466edc9bffb996b /drivers/gpu/drm/xe/xe_trace.h | |
parent | f6c39feed02117db5dfe988321a1a4dee2a9a3e2 (diff) | |
download | linux-8656ea9ae8b488ac25fdd332c60e6fd805cde171.tar.xz |
drm/xe: Add event tracing for CTB
Event tracing enabled for CTB submissions.
Additional minor refactor - Removed a unnecessary ct_to_xe() call.
v2: Remove a unwanted comment (Hari)
Add missing change to commit message
Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Reviewed-by: Haridhar Kalvala <haridhar.kalvala@intel.com>
Link: https://lore.kernel.org/intel-xe/20231019093140.1901665-2-balasubramani.vivekanandan@intel.com/
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_trace.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_trace.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_trace.h b/drivers/gpu/drm/xe/xe_trace.h index 5ea458dadf69..c43bb42aca5b 100644 --- a/drivers/gpu/drm/xe/xe_trace.h +++ b/drivers/gpu/drm/xe/xe_trace.h @@ -521,6 +521,7 @@ DEFINE_EVENT(xe_vm, xe_vm_rebind_worker_exit, TRACE_EVENT(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), +/* GuC */ TP_STRUCT__entry( __field(u32, _head) @@ -568,6 +569,46 @@ TRACE_EVENT(xe_guc_ct_g2h_flow_control, __entry->space, __entry->len) ); +DECLARE_EVENT_CLASS(xe_guc_ctb, + TP_PROTO(u8 gt_id, u32 action, u32 len, u32 _head, u32 tail), + TP_ARGS(gt_id, action, len, _head, tail), + + TP_STRUCT__entry( + __field(u8, gt_id) + __field(u32, action) + __field(u32, len) + __field(u32, tail) + __field(u32, _head) + ), + + TP_fast_assign( + __entry->gt_id = gt_id; + __entry->action = action; + __entry->len = len; + __entry->tail = tail; + __entry->_head = _head; + ), + + TP_printk("gt%d: H2G CTB: action=0x%x, len=%d, tail=%d, head=%d\n", + __entry->gt_id, __entry->action, __entry->len, + __entry->tail, __entry->_head) +); + +DEFINE_EVENT(xe_guc_ctb, xe_guc_ctb_h2g, + TP_PROTO(u8 gt_id, u32 action, u32 len, u32 _head, u32 tail), + TP_ARGS(gt_id, action, len, _head, tail) +); + +DEFINE_EVENT_PRINT(xe_guc_ctb, xe_guc_ctb_g2h, + TP_PROTO(u8 gt_id, u32 action, u32 len, u32 _head, u32 tail), + TP_ARGS(gt_id, action, len, _head, tail), + + TP_printk("gt%d: G2H CTB: action=0x%x, len=%d, tail=%d, head=%d\n", + __entry->gt_id, __entry->action, __entry->len, + __entry->tail, __entry->_head) + +); + #endif /* This part must be outside protection */ |