summaryrefslogtreecommitdiff
path: root/overlay/gpu-perf.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-05-10 15:06:44 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-10 15:07:54 +0100
commit959b0c2d4a9b0b04da6f0bf26c881cc6c7006e8c (patch)
tree810e5abbdcfd10ddbf1f9719466822ccd172ecf0 /overlay/gpu-perf.c
parentef430bd6394b5e51d7474996b9599f726115911a (diff)
overlay: Convert to per-context seqno tracking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/gpu-perf.c')
-rw-r--r--overlay/gpu-perf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/overlay/gpu-perf.c b/overlay/gpu-perf.c
index fed5c4fe..f557b9f0 100644
--- a/overlay/gpu-perf.c
+++ b/overlay/gpu-perf.c
@@ -277,7 +277,8 @@ static int wait_begin(struct gpu_perf *gp, const void *event)
wait->comm = comm;
wait->comm->active = true;
- wait->seqno = sample->raw[GLOBAL_SEQNO];
+ wait->context = sample->raw[ENGINE];
+ wait->seqno = sample->raw[CTX_SEQNO];
wait->time = sample->time;
wait->next = gp->wait[sample->raw[CTX]];
gp->wait[sample->raw[CTX]] = wait;
@@ -291,7 +292,8 @@ static int wait_end(struct gpu_perf *gp, const void *event)
struct gpu_perf_time *wait, **prev;
for (prev = &gp->wait[sample->raw[ENGINE]]; (wait = *prev) != NULL; prev = &wait->next) {
- if (wait->seqno != sample->raw[GLOBAL_SEQNO])
+ if (wait->context != sample->raw[CTX] ||
+ wait->seqno != sample->raw[CTX_SEQNO])
continue;
wait->comm->wait_time += sample->time - wait->time;