From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: intel-xe@lists.freedesktop.org, niranjana.vishwanathapura@intel.com
Cc: matthew.brost@intel.com, stuart.summers@intel.com
Subject: [PATCH v2 7/9] drm/xe/multi_queue: Add trace event for the multi queue timestamp
Date: Fri, 1 May 2026 17:53:40 -0700 [thread overview]
Message-ID: <20260502005332.3135977-18-umesh.nerlige.ramappa@intel.com> (raw)
In-Reply-To: <20260502005332.3135977-11-umesh.nerlige.ramappa@intel.com>
Add a trace event for multi queue timestamp capture.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
v2:
- Split traces from original patch (Stuart)
- Print primary lrc in the trace (Niranjana)
---
drivers/gpu/drm/xe/xe_lrc.c | 2 ++
drivers/gpu/drm/xe/xe_trace_lrc.h | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index 023202be5d52..6bd93803cb7f 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -2711,6 +2711,8 @@ static u64 xe_lrc_update_multi_queue_timestamp(struct xe_lrc *lrc, u64 *old_ts)
*old_ts = lrc->queue_timestamp;
lrc->queue_timestamp = xe_lrc_multi_queue_timestamp(lrc);
+ trace_xe_lrc_update_queue_timestamp(lrc, *old_ts);
+
return lrc->queue_timestamp;
}
diff --git a/drivers/gpu/drm/xe/xe_trace_lrc.h b/drivers/gpu/drm/xe/xe_trace_lrc.h
index d525cbee1e34..fdc77102fa77 100644
--- a/drivers/gpu/drm/xe/xe_trace_lrc.h
+++ b/drivers/gpu/drm/xe/xe_trace_lrc.h
@@ -12,6 +12,7 @@
#include <linux/tracepoint.h>
#include <linux/types.h>
+#include "xe_exec_queue_types.h"
#include "xe_gt_types.h"
#include "xe_lrc.h"
#include "xe_lrc_types.h"
@@ -42,6 +43,32 @@ TRACE_EVENT(xe_lrc_update_timestamp,
__get_str(device_id))
);
+TRACE_EVENT(xe_lrc_update_queue_timestamp,
+ TP_PROTO(struct xe_lrc *lrc, uint64_t old),
+ TP_ARGS(lrc, old),
+ TP_STRUCT__entry(
+ __field(struct xe_lrc *, lrc)
+ __field(u8, pos)
+ __field(u64, old)
+ __field(u64, new)
+ __string(name, lrc->fence_ctx.name)
+ __string(device_id, __dev_name_lrc(lrc))
+ ),
+
+ TP_fast_assign(
+ __entry->lrc = lrc->multi_queue.primary_lrc;
+ __entry->pos = lrc->multi_queue.pos;
+ __entry->old = old;
+ __entry->new = lrc->queue_timestamp;
+ __assign_str(name);
+ __assign_str(device_id);
+ ),
+ TP_printk("lrc=:%p pos=%d lrc->name=%s old=%llu new=%llu device_id:%s",
+ __entry->lrc, __entry->pos, __get_str(name),
+ __entry->old, __entry->new,
+ __get_str(device_id))
+);
+
#endif
/* This part must be outside protection */
--
2.43.0
next prev parent reply other threads:[~2026-05-02 0:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 0:53 [PATCH v2 0/9] Support run ticks for multi-queue use case Umesh Nerlige Ramappa
2026-05-02 0:53 ` [PATCH v2 1/9] drm/xe/lrc: Use 64 bit ctx timestamp in the LRC snapshot Umesh Nerlige Ramappa
2026-05-04 23:51 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 2/9] drm/xe: Add timestamp_ms to " Umesh Nerlige Ramappa
2026-05-04 23:59 ` Niranjana Vishwanathapura
2026-05-05 18:03 ` Umesh Nerlige Ramappa
2026-05-02 0:53 ` [PATCH v2 3/9] drm/xe/multi_queue: Store primary LRC and position info in LRC Umesh Nerlige Ramappa
2026-05-05 3:46 ` Niranjana Vishwanathapura
2026-05-05 18:35 ` Umesh Nerlige Ramappa
2026-05-05 18:45 ` Niranjana Vishwanathapura
2026-05-05 18:51 ` Umesh Nerlige Ramappa
2026-05-02 0:53 ` [PATCH v2 4/9] drm/xe/multi_queue: Add helpers to access CS QUEUE TIMESTAMP from lrc Umesh Nerlige Ramappa
2026-05-05 4:00 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 5/9] drm/xe/lrc: Refactor out engine id to hwe conversion Umesh Nerlige Ramappa
2026-05-05 4:16 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 6/9] drm/xe/multi_queue: Capture queue run times for active queues Umesh Nerlige Ramappa
2026-05-05 4:12 ` Niranjana Vishwanathapura
2026-05-05 19:02 ` Umesh Nerlige Ramappa
2026-05-02 0:53 ` Umesh Nerlige Ramappa [this message]
2026-05-05 4:19 ` [PATCH v2 7/9] drm/xe/multi_queue: Add trace event for the multi queue timestamp Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 8/9] drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue Umesh Nerlige Ramappa
2026-05-05 4:20 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 9/9] drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register Umesh Nerlige Ramappa
2026-05-05 4:25 ` Niranjana Vishwanathapura
2026-05-05 17:58 ` Umesh Nerlige Ramappa
2026-05-05 18:34 ` Niranjana Vishwanathapura
2026-05-05 19:06 ` Umesh Nerlige Ramappa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260502005332.3135977-18-umesh.nerlige.ramappa@intel.com \
--to=umesh.nerlige.ramappa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=niranjana.vishwanathapura@intel.com \
--cc=stuart.summers@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox