Revert "intel_gpu_top:print a visual clue on how big a certain use is"
authorRobert Bragg <robert@linux.intel.com>
Sun, 7 Jun 2009 22:26:18 +0000 (23:26 +0100)
committerEric Anholt <eric@anholt.net>
Tue, 9 Jun 2009 18:31:15 +0000 (11:31 -0700)
This reverts commit 5e13b98da1e7e31cffba84fd257002357d5f2682.

We can print prettier graphs using unicode

Signed-off-by: Eric Anholt <eric@anholt.net>
tools/intel_gpu_top.c

index 21fa844..538b9ee 100644 (file)
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
 #include <err.h>
 #include "intel_gpu_tools.h"
 
 #define MAX_NUM_TOP_BITS       100
 
-int use_stars;
-
 struct top_bit {
        /* initial setup */
        uint32_t *reg;
@@ -183,11 +180,6 @@ int main(int argc, char **argv)
        intel_get_mmio();
        uint32_t ring_size;
 
-       if (argc > 1) {
-               if (strcmp(argv[1], "--stars")==0)
-                       use_stars = 1;
-       }
-
        if (IS_965(devid)) {
                add_instdone_bit(I965_ROW_0_EU_0_DONE, "Row 0, EU 0");
                add_instdone_bit(I965_ROW_0_EU_1_DONE, "Row 0, EU 1");
@@ -295,19 +287,13 @@ int main(int argc, char **argv)
                       total_ring_full / ring_size);
                printf("%30s  %s\n\n", "task", "percent busy");
                for (i = 0; i < num_top_bits; i++) {
-                       int j;
                        if (top_bits_sorted[i]->count == 0)
                                break;
 
-                       printf("%30s: %d%% ",
-                               top_bits_sorted[i]->name,
-                               top_bits_sorted[i]->count);
+                       printf("%30s: %d%%\n",
+                              top_bits_sorted[i]->name,
+                              top_bits_sorted[i]->count);
 
-                       if (use_stars) {
-                               for (j = 0; j < top_bits_sorted[i]->count / 4; j++)
-                                       printf("*");
-                       }
-                       printf("\n");
                        top_bits_sorted[i]->count = 0;
                }
        }