Mesa (master): i965: Print instructions' children during scheduling debugging.

Matt Turner mattst88 at kemper.freedesktop.org
Thu Oct 17 03:49:57 UTC 2013


Module: Mesa
Branch: master
Commit: 7d0519c0823b15a884a852f2f2884cdb95a1ab75
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d0519c0823b15a884a852f2f2884cdb95a1ab75

Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Oct  8 23:03:41 2013 -0700

i965: Print instructions' children during scheduling debugging.

Useful for tracking down problems in dependency calculations.

Scheduling debugging now prints:

clock    2, scheduled: linterp vgrf5, hw_reg2, hw_reg3, hw_reg0,
        child 0, 53 parents: fb_write (null), (null), (null), (null),
        child 1, 2 parents: tex vgrf4, vgrf5, (null), (null),
        child 2, 52 parents: placeholder_halt (null), (null), (null), (null),
clock    4, scheduled: linterp vgrf5+1, hw_reg2, hw_reg3, hw_reg0+16,
        child 0, 52 parents: fb_write (null), (null), (null), (null),
        child 1, 1 parents: tex vgrf4, vgrf5, (null), (null),
                now available
        child 2, 51 parents: placeholder_halt (null), (null), (null), (null),

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 .../drivers/dri/i965/brw_schedule_instructions.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index b24c38c..84b74ff 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -1065,11 +1065,15 @@ instruction_scheduler::schedule_instructions(backend_instruction *next_block_hea
 	 child->unblocked_time = MAX2(child->unblocked_time,
 				      time + chosen->child_latency[i]);
 
+         if (debug) {
+            printf("\tchild %d, %d parents: ", i, child->parent_count);
+            bv->dump_instruction(child->inst);
+         }
+
 	 child->parent_count--;
 	 if (child->parent_count == 0) {
             if (debug) {
-               printf("now available: ");
-               bv->dump_instruction(child->inst);
+               printf("\t\tnow available\n");
             }
 	    instructions.push_tail(child);
 	 }




More information about the mesa-commit mailing list