summaryrefslogtreecommitdiff
path: root/overlay/overlay.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-17 21:14:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-17 21:14:10 +0100
commiteed59eac47bae095513a5b1b6286fdd556d8a760 (patch)
tree3937d8c00440dacc50358b1156bd0228a04fc55f /overlay/overlay.c
parentcc9de398cf5232e547e9131d72782732a552fc56 (diff)
overlay: Show per-process wait times
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/overlay.c')
-rw-r--r--overlay/overlay.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c
index 6297e5ed..b41dfc44 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -244,6 +244,8 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
}
for (prev = &gp->gpu_perf.comm; (comm = *prev) != NULL; ) {
+ int need_comma = 0;
+
if (comm->user_data) {
struct chart *c = comm->user_data;
cairo_set_source_rgba(ctx->cr,
@@ -259,8 +261,19 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
for (n = 0; n < 3; n++) {
if (comm->nr_requests[n] == 0)
continue;
- sprintf(buf, " %d %s", comm->nr_requests[n], ring_name[n]);
+ sprintf(buf, "%s %d %s", need_comma ? "," : "", comm->nr_requests[n], ring_name[n]);
cairo_show_text(ctx->cr, buf);
+ need_comma = true;
+ }
+ if (comm->wait_time) {
+ if (comm->wait_time > 100) {
+ sprintf(buf, "%s %.1f us waiting",
+ need_comma ? "," : "",
+ comm->wait_time / 1000.);
+ cairo_show_text(ctx->cr, buf);
+ need_comma = true;
+ }
+ comm->wait_time = 0;
}
y += 14;