summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2018-02-15 11:25:15 +0000
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2018-02-15 13:40:45 +0000
commitf2ac5601be25c683e89f7b6ee704c1b1b9eb1b30 (patch)
tree77f8b3616451f068f6522057171c39a07b9b103c /tests
parent64c216764e059f51b653b3bbfaf4776d1903f141 (diff)
tests/perf_pmu: Log perf timestamp in semaphore wait tests
We need more data to debug sporadic test failures. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/perf_pmu.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index a7501ca5..7d9c42d1 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);