From: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <matthew.brost@intel.com>,
<stuart.summers@intel.com>
Subject: Re: [PATCH v3 09/11] drm/xe/multi_queue: Add trace event for the multi queue timestamp
Date: Tue, 5 May 2026 22:03:26 -0700 [thread overview]
Message-ID: <afrLnnwqAkKeNNjn@nvishwa1-desk> (raw)
In-Reply-To: <20260505234408.3552147-22-umesh.nerlige.ramappa@intel.com>
On Tue, May 05, 2026 at 04:44:18PM -0700, Umesh Nerlige Ramappa wrote:
>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)
>
>v3:
>- Include primary_lrc as well as lrc in the trace (Niranjana)
>---
> drivers/gpu/drm/xe/xe_lrc.c | 2 ++
> drivers/gpu/drm/xe/xe_trace_lrc.h | 29 +++++++++++++++++++++++++++++
> 2 files changed, 31 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
>index 28060a3d4f11..ea65160a582a 100644
>--- a/drivers/gpu/drm/xe/xe_lrc.c
>+++ b/drivers/gpu/drm/xe/xe_lrc.c
>@@ -2700,6 +2700,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..4f3c1a0de573 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,34 @@ 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(struct xe_lrc *, primary_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;
>+ __entry->primary_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 primary_lrc:%p pos=%d lrc->name=%s old=%llu new=%llu device_id:%s",
>+ __entry->lrc, __entry->primary_lrc, __entry->pos, __get_str(name),
>+ __entry->old, __entry->new,
>+ __get_str(device_id))
I still think printing 'pos' here does not add much value (we are not printing it in
exec queue trace event also).
BTW, why do we need ':'s before %p? I see it is there in xe_lrc_update_timestamp(),
but that seems to be a mistake (I don't see other trace messages having it while
printing pointer values).
Niranjana
>+);
>+
> #endif
>
> /* This part must be outside protection */
>--
>2.51.0
>
next prev parent reply other threads:[~2026-05-06 5:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 23:44 [PATCH v3 00/11] Support run ticks for multi-queue use case Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 01/11] drm/xe/lrc: Use 64 bit ctx timestamp in the LRC snapshot Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 02/11] drm/xe: Add timestamp_ms to " Umesh Nerlige Ramappa
2026-05-06 3:10 ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 03/11] drm/xe/lrc: Refactor xe_lrc_timestamp to simplify logic Umesh Nerlige Ramappa
2026-05-06 3:13 ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 04/11] drm/xe/multi_queue: Refactor check for multi queue support for engine class Umesh Nerlige Ramappa
2026-05-06 3:16 ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 05/11] drm/xe/multi_queue: Store primary LRC and position info in LRC Umesh Nerlige Ramappa
2026-05-06 3:47 ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 06/11] drm/xe/multi_queue: Add helpers to access CS QUEUE TIMESTAMP from lrc Umesh Nerlige Ramappa
2026-05-06 3:25 ` Niranjana Vishwanathapura
2026-05-06 5:07 ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 07/11] drm/xe/lrc: Refactor out engine id to hwe conversion Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 08/11] drm/xe/multi_queue: Capture queue run times for active queues Umesh Nerlige Ramappa
2026-05-06 3:30 ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 09/11] drm/xe/multi_queue: Add trace event for the multi queue timestamp Umesh Nerlige Ramappa
2026-05-06 5:03 ` Niranjana Vishwanathapura [this message]
2026-05-06 20:25 ` Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 10/11] drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 11/11] drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register Umesh Nerlige Ramappa
2026-05-06 3:31 ` Niranjana Vishwanathapura
2026-05-05 23:51 ` ✗ CI.checkpatch: warning for Support run ticks for multi-queue use case (rev3) Patchwork
2026-05-05 23:53 ` ✓ CI.KUnit: success " Patchwork
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=afrLnnwqAkKeNNjn@nvishwa1-desk \
--to=niranjana.vishwanathapura@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=stuart.summers@intel.com \
--cc=umesh.nerlige.ramappa@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