summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-03-21 13:12:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-03-21 13:13:40 +0000
commite7a0d06730f77842998368660fb45fe5c1738fda (patch)
tree9cf712e244b79c1ed35c770699bbb9ddbe3cbc6a
parent2debc96208a7d433ce1a313945fe5aa1a87192c4 (diff)
igt/gem_exec_nop: Sync before measuring total elapsed time
The systematic error should be lost in the millions of cycles, but better pedagogically correct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tests/gem_exec_nop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index 5a2f1b93..5d0d4957 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -387,6 +387,9 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
count += 1024;
clock_gettime(CLOCK_MONOTONIC, &now);
} while (elapsed(&start, &now) < timeout); /* Hang detection ~120s */
+
+ gem_sync(fd, obj[0].handle);
+ clock_gettime(CLOCK_MONOTONIC, &now);
results[child] = elapsed(&start, &now) / count;
if (flags & CONTEXT)