All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] tests/perf_pmu: Log perf timestamp in semaphore wait tests
Date: Thu, 15 Feb 2018 11:25:15 +0000	[thread overview]
Message-ID: <20180215112515.27434-1-tvrtko.ursulin@linux.intel.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

We need more data to debug sporadic test failures.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tests/perf_pmu.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index a7501ca5f7a4..7d9c42d16a08 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -561,7 +561,7 @@ sema_wait(int gem_fd, const struct intel_execution_engine2 *e,
 	unsigned long slept;
 	uint32_t *obj_ptr;
 	uint32_t batch[16];
-	uint64_t val[2];
+	uint64_t val[2], ts[2];
 	int fd;
 
 	igt_require(intel_gen(intel_get_drm_devid(gem_fd)) >= 8);
@@ -629,13 +629,15 @@ sema_wait(int gem_fd, const struct intel_execution_engine2 *e,
 	igt_assert_f(igt_wait(pmu_read_single(fd) != val[0], 10, 1),
 		     "sampling failed to start withing 10ms");
 
-	val[0] = pmu_read_single(fd);
+	val[0] = __pmu_read_single(fd, &ts[0]);
 	slept = measured_usleep(batch_duration_ns / 1000);
 	if (flags & TEST_TRAILING_IDLE)
 		obj_ptr[0] = 1;
-	val[1] = pmu_read_single(fd);
-	igt_debug("slept %.3fms, sampled %.3fms\n",
-		  slept*1e-6, (val[1] - val[0])*1e-6);
+	val[1] = __pmu_read_single(fd, &ts[1]);
+	igt_debug("slept %.3fms (perf %.3fms), sampled %.3fms\n",
+		  slept * 1e-6,
+		  (ts[1] - ts[0]) * 1e-6,
+		  (val[1] - val[0]) * 1e-6);
 
 	obj_ptr[0] = 1;
 	gem_sync(gem_fd, bb_handle);
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [igt-dev] [PATCH i-g-t] tests/perf_pmu: Log perf timestamp in semaphore wait tests
Date: Thu, 15 Feb 2018 11:25:15 +0000	[thread overview]
Message-ID: <20180215112515.27434-1-tvrtko.ursulin@linux.intel.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

We need more data to debug sporadic test failures.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tests/perf_pmu.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index a7501ca5f7a4..7d9c42d16a08 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -561,7 +561,7 @@ sema_wait(int gem_fd, const struct intel_execution_engine2 *e,
 	unsigned long slept;
 	uint32_t *obj_ptr;
 	uint32_t batch[16];
-	uint64_t val[2];
+	uint64_t val[2], ts[2];
 	int fd;
 
 	igt_require(intel_gen(intel_get_drm_devid(gem_fd)) >= 8);
@@ -629,13 +629,15 @@ sema_wait(int gem_fd, const struct intel_execution_engine2 *e,
 	igt_assert_f(igt_wait(pmu_read_single(fd) != val[0], 10, 1),
 		     "sampling failed to start withing 10ms");
 
-	val[0] = pmu_read_single(fd);
+	val[0] = __pmu_read_single(fd, &ts[0]);
 	slept = measured_usleep(batch_duration_ns / 1000);
 	if (flags & TEST_TRAILING_IDLE)
 		obj_ptr[0] = 1;
-	val[1] = pmu_read_single(fd);
-	igt_debug("slept %.3fms, sampled %.3fms\n",
-		  slept*1e-6, (val[1] - val[0])*1e-6);
+	val[1] = __pmu_read_single(fd, &ts[1]);
+	igt_debug("slept %.3fms (perf %.3fms), sampled %.3fms\n",
+		  slept * 1e-6,
+		  (ts[1] - ts[0]) * 1e-6,
+		  (val[1] - val[0]) * 1e-6);
 
 	obj_ptr[0] = 1;
 	gem_sync(gem_fd, bb_handle);
-- 
2.14.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2018-02-15 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 11:25 Tvrtko Ursulin [this message]
2018-02-15 11:25 ` [igt-dev] [PATCH i-g-t] tests/perf_pmu: Log perf timestamp in semaphore wait tests Tvrtko Ursulin
2018-02-15 13:04 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-02-15 13:05 ` [PATCH i-g-t] " Chris Wilson
2018-02-15 13:05   ` [igt-dev] [Intel-gfx] " Chris Wilson
2018-02-15 20:49 ` [igt-dev] ✗ Fi.CI.IGT: warning for " 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=20180215112515.27434-1-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=igt-dev@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.