Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH i-g-t v3 02/10] tests/intel/xe_drm_fdinfo: Print timestamp for debug
Date: Tue, 27 Aug 2024 09:54:41 -0700	[thread overview]
Message-ID: <20240827165449.1706784-3-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20240827165449.1706784-1-lucas.demarchi@intel.com>

xe_spin is capable of writing the timestamp from the GPU side. This is a
good way to compare what we are reading from the fdinfo with what the
GPU is seeing. Example output:

(xe_drm_fdinfo:10404) DEBUG: rcs: spinner ended (timestamp=9817720)
(xe_drm_fdinfo:10404) DEBUG: bcs: spinner ended (timestamp=9755785)
(xe_drm_fdinfo:10404) DEBUG: vecs: spinner ended (timestamp=9653024)
(xe_drm_fdinfo:10404) DEBUG: ccs: spinner ended (timestamp=9722776)
(xe_drm_fdinfo:10404) DEBUG: rcs: sample 1: cycles 19513436, total_cycles 130596422980
(xe_drm_fdinfo:10404) DEBUG: rcs: sample 2: cycles 29331470, total_cycles 130606141449

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 tests/intel/xe_drm_fdinfo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_drm_fdinfo.c b/tests/intel/xe_drm_fdinfo.c
index e3a99a2dc..074a89711 100644
--- a/tests/intel/xe_drm_fdinfo.c
+++ b/tests/intel/xe_drm_fdinfo.c
@@ -416,6 +416,7 @@ spin_sync_start(int fd, struct spin_ctx *ctx)
 		return;
 
 	ctx->spin_opts.addr = ctx->addr;
+	ctx->spin_opts.write_timestamp = true;
 	ctx->spin_opts.preempt = true;
 	xe_spin_init(ctx->spin, &ctx->spin_opts);
 
@@ -448,7 +449,8 @@ spin_sync_end(int fd, struct spin_ctx *ctx)
 	igt_assert(syncobj_wait(fd, &ctx->sync[0].handle, 1, INT64_MAX, 0, NULL));
 
 	ctx->ended = true;
-	igt_debug("%s: spinner ended\n", engine_map[ctx->class]);
+	igt_debug("%s: spinner ended (timestamp=%u)\n", engine_map[ctx->class],
+		  ctx->spin->timestamp);
 }
 
 static void
-- 
2.43.0


  parent reply	other threads:[~2024-08-27 16:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 16:54 [PATCH i-g-t v3 00/10] tests/intel/xe_drm_fdinfo: Fix noise and improve Lucas De Marchi
2024-08-27 16:54 ` [PATCH i-g-t v3 01/10] tests/intel/xe_drm_fdinfo: Extend mercy to the upper end Lucas De Marchi
2024-08-28 14:44   ` Nirmoy Das
2024-08-28 14:46     ` Nirmoy Das
2024-08-27 16:54 ` Lucas De Marchi [this message]
2024-08-28 14:45   ` [PATCH i-g-t v3 02/10] tests/intel/xe_drm_fdinfo: Print timestamp for debug Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 03/10] lib/igt_core: Add igt_assert_lt_double() Lucas De Marchi
2024-08-28 14:46   ` Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 04/10] tests/intel/xe_drm_fdinfo: Use igt_assert_lt_double() Lucas De Marchi
2024-08-28 14:48   ` Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 05/10] tests/intel/xe_drm_fdinfo: Be strict on == 0 comparison Lucas De Marchi
2024-08-28 14:51   ` Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 06/10] tests/intel/xe_drm_fdinfo: Use usec for batch duration Lucas De Marchi
2024-08-28 14:51   ` Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 07/10] tests/intel/xe_drm_fdinfo: Half the execution time Lucas De Marchi
2024-08-28 14:52   ` Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 08/10] tests/intel/xe_drm_fdinfo: Remove unused flags Lucas De Marchi
2024-08-28 15:00   ` Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 09/10] tests/intel/xe_drm_fdinfo: Use enum with expected load Lucas De Marchi
2024-08-28 14:56   ` Nirmoy Das
2024-08-27 16:54 ` [PATCH i-g-t v3 10/10] tests/intel/xe_drm_fdinfo: Rename and reorder tests Lucas De Marchi
2024-08-28 15:08   ` Nirmoy Das
2024-08-28 15:14     ` Nirmoy Das
2024-08-27 18:27 ` ✓ CI.xeBAT: success for tests/intel/xe_drm_fdinfo: Fix noise and improve (rev2) Patchwork
2024-08-27 18:38 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-08-28  4:05 ` ✗ CI.xeFULL: " 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=20240827165449.1706784-3-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --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