if (busy == NULL)
return 0;
+ busy->ring = sample->raw[1];
busy->seqno = sample->raw[2];
busy->time = sample->time;
busy->comm = comm;
struct gpu_perf_time *busy, **prev;
for (prev = &gp->busy; (busy = *prev) != NULL; prev = &busy->next) {
+ if (busy->ring != sample->raw[1])
+ continue;
+
if (busy->seqno != sample->raw[2])
continue;
return 0;
wait->comm = comm;
- wait->seqno = sample->raw[3];
+ wait->ring = sample->raw[1];
+ wait->seqno = sample->raw[2];
wait->time = sample->time;
wait->next = gp->wait;
gp->wait = wait;
struct gpu_perf_time *wait, **prev;
for (prev = &gp->wait; (wait = *prev) != NULL; prev = &wait->next) {
- if (wait->seqno != sample->raw[3])
+ if (wait->ring != sample->raw[1])
+ continue;
+
+ if (wait->seqno != sample->raw[2])
continue;
wait->comm->wait_time += sample->time - wait->time;