summaryrefslogtreecommitdiff
path: root/overlay
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
parentef430bd6394b5e51d7474996b9599f726115911a (diff)
overlay: Convert to per-context seqno tracking
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay')
-rw-r--r--overlay/gpu-perf.c6
-rw-r--r--overlay/gpu-perf.h1
2 files changed, 5 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;
diff --git a/overlay/gpu-perf.h b/overlay/gpu-perf.h
index 0d869869..6c81e62b 100644
--- a/overlay/gpu-perf.h
+++ b/overlay/gpu-perf.h
@@ -61,6 +61,7 @@ struct gpu_perf {
struct gpu_perf_time {
struct gpu_perf_time *next;
struct gpu_perf_comm *comm;
+ uint32_t context;
uint32_t seqno;
uint64_t time;
} *wait[MAX_RINGS];