diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2018-06-06 10:02:33 +0100 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2018-06-06 11:58:45 +0100 |
commit | c8f1ae58e1b7da17af4722a5ce5a9cd8b9a34059 (patch) | |
tree | 91c4383b0e488492d34aed95e1043f6cf7f3a2a4 /overlay/overlay.c | |
parent | d4c8aa79b29fb6eef6b8b81d73356c1b272bb788 (diff) |
intel_gpu_overlay: Update for class:instance engine tracepoints
A miminal hack to parse the new tracepoint format and invent new "ring
id's" based on engine class and instance.
v2:
* Make it a bit more future proof. (Lionel, Chris)
* Some assorted fixups to show forgotten engines.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Diffstat (limited to 'overlay/overlay.c')
-rw-r--r-- | overlay/overlay.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c index 545af7bc..eae5ddfa 100644 --- a/overlay/overlay.c +++ b/overlay/overlay.c @@ -148,6 +148,7 @@ static void init_gpu_top(struct overlay_context *ctx, { 0.25, 1, 0.25, 1 }, { 0.25, 0.25, 1, 1 }, { 1, 1, 1, 1 }, + { 1, 1, 0.25, 1 }, }; int n; @@ -311,11 +312,11 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf * { 1, 1, 1, 1 }, }; struct gpu_perf_comm *comm, **prev; - const char *ring_name[] = { - "R", - "B", - "V0", - "V1", + const char *ring_name[MAX_RINGS] = { + "R", "?", "?", "?", + "B", "?", "?", "?", + "V0", "V1", "?", "?", + "VE0", "?", "?", "?", }; double range[2]; char buf[1024]; @@ -326,7 +327,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf * gpu_perf_update(&gp->gpu_perf); - for (n = 0; n < 4; n++) { + for (n = 0; n < MAX_RINGS; n++) { if (gp->gpu_perf.ctx_switch[n]) has_ctx = n + 1; if (gp->gpu_perf.flip_complete[n]) @@ -389,7 +390,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf * } total = 0; - for (n = 0; n < 3; n++) + for (n = 0; n < MAX_RINGS; n++) total += comm->nr_requests[n]; chart_add_sample(comm->user_data, total); } @@ -433,7 +434,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 < sizeof(ring_name)/sizeof(ring_name[0]); n++) { + for (n = 0; n < MAX_RINGS; n++) { if (comm->nr_requests[n] == 0) continue; len += sprintf(buf + len, "%s %d%s", need_comma ? "," : "", comm->nr_requests[n], ring_name[n]); |