i965: Print out cycle estimates at the start of block annotations.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 11 Dec 2016 06:13:05 +0000 (22:13 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 12 Dec 2016 00:33:05 +0000 (16:33 -0800)
We now print

   START B15 <-B14 (42774 cycles)

indicating that we estimate B15 will take 42,774 cycles.  Printing
this should make it easier where time is spent in the program.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/intel_asm_annotation.c

index b01490a1822e341f02d3eae0377b7b452ca47566..bb24e5e8ad2415a192f98ed504c7a48d575351a0 100644 (file)
@@ -45,7 +45,7 @@ dump_assembly(void *assembly, int num_annotations, struct annotation *annotation
             struct bblock_t *predecessor_block = predecessor_link->block;
             fprintf(stderr, " <-B%d", predecessor_block->num);
          }
-         fprintf(stderr, "\n");
+         fprintf(stderr, " (%u cycles)\n", annotation[i].block_start->cycle_count);
       }
 
       if (last_annotation_ir != annotation[i].ir) {