diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index bedef12a..66e61c4c 100644 --- a/tools/intel_gpu_top.c +++ b/tools/intel_gpu_top.c @@ -28,11 +28,14 @@ #include #include #include +#include #include #include "intel_gpu_tools.h" #define MAX_NUM_TOP_BITS 100 +int use_stars; + struct top_bit { /* initial setup */ uint32_t *reg; @@ -88,6 +91,11 @@ 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"); @@ -192,13 +200,19 @@ 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%%\n", - top_bits_sorted[i]->name, - top_bits_sorted[i]->count); + printf("%30s: %d%% ", + 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; } }