intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
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 v4 09/11] drm/xe/multi_queue: Add trace event for the multi queue timestamp
Date: Wed, 6 May 2026 17:28:07 -0700	[thread overview]
Message-ID: <afvcl-3Yk-PR2P_p@nvishwa1-desk> (raw)
In-Reply-To: <20260506223500.3769614-22-umesh.nerlige.ramappa@intel.com>

On Wed, May 06, 2026 at 03:35:10PM -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)
>
>v4: (Niranjana)
>- Drop pos from trace
>- Drop ':' before the pointer value

LGTM.
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>

>---
> 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 869ce0c09939..cd5daf628a89 100644
>--- a/drivers/gpu/drm/xe/xe_lrc.c
>+++ b/drivers/gpu/drm/xe/xe_lrc.c
>@@ -2723,6 +2723,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..5c4cfa0c1fe9 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(struct xe_lrc *, primary_lrc)
>+		     __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->old = old;
>+		   __entry->new = lrc->queue_timestamp;
>+		   __assign_str(name);
>+		   __assign_str(device_id);
>+		   ),
>+	    TP_printk("lrc=%p primary_lrc=%p lrc->name=%s old=%llu new=%llu device_id:%s",
>+		      __entry->lrc, __entry->primary_lrc, __get_str(name),
>+		      __entry->old, __entry->new,
>+		      __get_str(device_id))
>+);
>+
> #endif
>
> /* This part must be outside protection */
>-- 
>2.51.0
>

  reply	other threads:[~2026-05-07  0:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 22:35 [PATCH v4 00/11] Support run ticks for multi-queue use case Umesh Nerlige Ramappa
2026-05-06 22:35 ` [PATCH v4 01/11] drm/xe/lrc: Use 64 bit ctx timestamp in the LRC snapshot Umesh Nerlige Ramappa
2026-05-06 22:35 ` [PATCH v4 02/11] drm/xe: Add timestamp_ms to " Umesh Nerlige Ramappa
2026-05-06 22:35 ` [PATCH v4 03/11] drm/xe/lrc: Refactor xe_lrc_timestamp to simplify logic Umesh Nerlige Ramappa
2026-05-06 22:35 ` [PATCH v4 04/11] drm/xe/multi_queue: Refactor check for multi queue support for engine class Umesh Nerlige Ramappa
2026-05-07  0:28   ` Niranjana Vishwanathapura
2026-05-06 22:35 ` [PATCH v4 05/11] drm/xe/multi_queue: Store primary LRC and position info in LRC Umesh Nerlige Ramappa
2026-05-07  0:35   ` Niranjana Vishwanathapura
2026-05-07  1:39     ` Niranjana Vishwanathapura
2026-05-06 22:35 ` [PATCH v4 06/11] drm/xe/multi_queue: Add helpers to access CS QUEUE TIMESTAMP from lrc Umesh Nerlige Ramappa
2026-05-07  0:29   ` Niranjana Vishwanathapura
2026-05-06 22:35 ` [PATCH v4 07/11] drm/xe/lrc: Refactor out engine id to hwe conversion Umesh Nerlige Ramappa
2026-05-06 22:35 ` [PATCH v4 08/11] drm/xe/multi_queue: Capture queue run times for active queues Umesh Nerlige Ramappa
2026-05-06 22:35 ` [PATCH v4 09/11] drm/xe/multi_queue: Add trace event for the multi queue timestamp Umesh Nerlige Ramappa
2026-05-07  0:28   ` Niranjana Vishwanathapura [this message]
2026-05-06 22:35 ` [PATCH v4 10/11] drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue Umesh Nerlige Ramappa
2026-05-06 22:35 ` [PATCH v4 11/11] drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register Umesh Nerlige Ramappa
2026-05-06 22:41 ` ✗ CI.checkpatch: warning for Support run ticks for multi-queue use case (rev4) Patchwork
2026-05-06 22:42 ` ✓ CI.KUnit: success " Patchwork
2026-05-06 23:44 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-07  0:44 ` ✗ Xe.CI.FULL: failure " 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=afvcl-3Yk-PR2P_p@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).