summaryrefslogtreecommitdiff
path: root/overlay
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-05-10 14:09:16 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-10 14:10:22 +0100
commitef430bd6394b5e51d7474996b9599f726115911a (patch)
treef1dea7883ba2291c6bf10f20a2a2b08963569286 /overlay
parent43f6fceef90149872011bdf2aeaabcae585ec654 (diff)
overlay: Fixup new layout of tracepoints
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay')
-rw-r--r--overlay/gpu-perf.c24
-rw-r--r--overlay/gpu-top.c3
-rw-r--r--overlay/overlay.c5
3 files changed, 22 insertions, 10 deletions
diff --git a/overlay/gpu-perf.c b/overlay/gpu-perf.c
index 42ac44d5..fed5c4fe 100644
--- a/overlay/gpu-perf.c
+++ b/overlay/gpu-perf.c
@@ -61,6 +61,14 @@ struct sample_event {
uint32_t raw[0];
};
+enum {
+ DEVICE = 0,
+ CTX,
+ ENGINE,
+ CTX_SEQNO,
+ GLOBAL_SEQNO
+};
+
static uint64_t tracepoint_id(const char *sys, const char *name)
{
char buf[1024];
@@ -218,7 +226,7 @@ static int request_add(struct gpu_perf *gp, const void *event)
if (comm == NULL)
return 0;
- comm->nr_requests[sample->raw[1]]++;
+ comm->nr_requests[sample->raw[ENGINE]]++;
return 1;
}
@@ -234,7 +242,7 @@ static int ctx_switch(struct gpu_perf *gp, const void *event)
{
const struct sample_event *sample = event;
- gp->ctx_switch[sample->raw[1]]++;
+ gp->ctx_switch[sample->raw[ENGINE]]++;
return 1;
}
@@ -265,12 +273,14 @@ static int wait_begin(struct gpu_perf *gp, const void *event)
if (wait == NULL)
return 0;
+ /* XXX argument order CTX == ENGINE! */
+
wait->comm = comm;
wait->comm->active = true;
- wait->seqno = sample->raw[2];
+ wait->seqno = sample->raw[GLOBAL_SEQNO];
wait->time = sample->time;
- wait->next = gp->wait[sample->raw[1]];
- gp->wait[sample->raw[1]] = wait;
+ wait->next = gp->wait[sample->raw[CTX]];
+ gp->wait[sample->raw[CTX]] = wait;
return 0;
}
@@ -280,8 +290,8 @@ static int wait_end(struct gpu_perf *gp, const void *event)
const struct sample_event *sample = event;
struct gpu_perf_time *wait, **prev;
- for (prev = &gp->wait[sample->raw[1]]; (wait = *prev) != NULL; prev = &wait->next) {
- if (wait->seqno != sample->raw[2])
+ for (prev = &gp->wait[sample->raw[ENGINE]]; (wait = *prev) != NULL; prev = &wait->next) {
+ if (wait->seqno != sample->raw[GLOBAL_SEQNO])
continue;
wait->comm->wait_time += sample->time - wait->time;
diff --git a/overlay/gpu-top.c b/overlay/gpu-top.c
index 4097cd06..891a7ea7 100644
--- a/overlay/gpu-top.c
+++ b/overlay/gpu-top.c
@@ -69,8 +69,9 @@ static int perf_init(struct gpu_top *gt)
{
const char *names[] = {
"RCS",
- "VCS",
"BCS",
+ "VCS0",
+ "VCS1",
NULL,
};
int n;
diff --git a/overlay/overlay.c b/overlay/overlay.c
index b726588d..b30f7a1d 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -313,8 +313,9 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
struct gpu_perf_comm *comm, **prev;
const char *ring_name[] = {
"R",
- "V",
"B",
+ "V0",
+ "V1",
};
double range[2];
char buf[1024];
@@ -432,7 +433,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
goto skip_comm;
len = sprintf(buf, "%s:", comm->name);
- for (n = 0; n < 3; n++) {
+ for (n = 0; n < sizeof(ring_name)/sizeof(ring_name[0]); n++) {
if (comm->nr_requests[n] == 0)
continue;
len += sprintf(buf + len, "%s %d%s", need_comma ? "," : "", comm->nr_requests[n], ring_name[n]);