summaryrefslogtreecommitdiff
path: root/overlay/overlay.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-27 17:51:11 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-27 17:51:51 +0100
commit11567e318e6a05936bab135e6ed90726583ab031 (patch)
treef18a31a3c507330d08dc6ef5c473086018fcc771 /overlay/overlay.c
parentc6b26c5a406225868f05672949bcc4997c94c3ab (diff)
overlay: Include the core count in the cpu info line
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/overlay.c')
-rw-r--r--overlay/overlay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c
index a457a409..d270f16b 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -222,7 +222,9 @@ static void show_gpu_top(struct overlay_context *ctx, struct overlay_gpu_top *gt
y = PAD + 12 - 2;
cairo_set_source_rgba(ctx->cr, 0.75, 0.25, 0.75, 1.);
cairo_move_to(ctx->cr, PAD, y);
- sprintf(txt, "CPU: %3d%% busy", gt->cpu_top.busy * gt->cpu_top.nr_cpu);
+ len = sprintf(txt, "CPU: %3d%% busy", gt->cpu_top.busy * gt->cpu_top.nr_cpu);
+ if (gt->cpu_top.nr_cpu)
+ sprintf(txt + len, " (%d cores)", gt->cpu_top.nr_cpu);
cairo_show_text(ctx->cr, txt);
y += 14;