diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-28 13:12:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-28 13:13:47 +0100 |
commit | 4bf3ca8422e2153b208b0cba791b8a45c64ac9d9 (patch) | |
tree | 93fc32597b8ac16c71c3d8af6f5c9e3b00490d54 /benchmarks/gem_exec_trace.c | |
parent | 49e09e73460b74a56b210b804f32abbcf5eab66a (diff) |
benchmarks/gem_exec_trace: Include client wait points
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'benchmarks/gem_exec_trace.c')
-rw-r--r-- | benchmarks/gem_exec_trace.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/benchmarks/gem_exec_trace.c b/benchmarks/gem_exec_trace.c index ddd140f4..83b2a837 100644 --- a/benchmarks/gem_exec_trace.c +++ b/benchmarks/gem_exec_trace.c @@ -50,6 +50,7 @@ enum { ADD_CTX, DEL_CTX, EXEC, + WAIT, }; struct trace_add_bo { @@ -85,6 +86,10 @@ struct trace_exec_object { uint64_t rsvd2; }__attribute__((packed)); +struct trace_wait { + uint32_t handle; +} __attribute__((packed)); + static double elapsed(const struct timespec *start, const struct timespec *end) { return 1e3*(end->tv_sec - start->tv_sec) + 1e-6*(end->tv_nsec - start->tv_nsec); @@ -242,6 +247,15 @@ static double replay(const char *filename) break; } + case WAIT: + { + struct trace_wait *t = (void *)ptr; + ptr = (void *)(t + 1); + + gem_wait(fd, t->handle, NULL); + break; + } + default: fprintf(stderr, "Unknown cmd: %x\n", *ptr); return -1; |