i965: Add debug flag to print out the new L3 state during transitions.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 5 Sep 2015 12:05:48 +0000 (15:05 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 9 Dec 2015 11:46:05 +0000 (13:46 +0200)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/mesa/drivers/dri/i965/gen7_l3_state.c
src/mesa/drivers/dri/i965/intel_debug.c
src/mesa/drivers/dri/i965/intel_debug.h

index cacd1aa80fe9388036c4271e36fd66a5994564fa..79569358914c80977d7f25fd97074fa150c3f008 100644 (file)
@@ -460,6 +460,18 @@ update_urb_size(struct brw_context *brw, const struct brw_l3_config *cfg)
    }
 }
 
+/**
+ * Print out the specified L3 configuration.
+ */
+static void
+dump_l3_config(const struct brw_l3_config *cfg)
+{
+   fprintf(stderr, "SLM=%d URB=%d ALL=%d DC=%d RO=%d IS=%d C=%d T=%d\n",
+           cfg->n[L3P_SLM], cfg->n[L3P_URB], cfg->n[L3P_ALL],
+           cfg->n[L3P_DC], cfg->n[L3P_RO],
+           cfg->n[L3P_IS], cfg->n[L3P_C], cfg->n[L3P_T]);
+}
+
 static void
 emit_l3_state(struct brw_context *brw)
 {
@@ -489,6 +501,11 @@ emit_l3_state(struct brw_context *brw)
       setup_l3_config(brw, cfg);
       update_urb_size(brw, cfg);
       brw->l3.config = cfg;
+
+      if (unlikely(INTEL_DEBUG & DEBUG_L3)) {
+         fprintf(stderr, "L3 config transition (%f > %f): ", dw, dw_threshold);
+         dump_l3_config(cfg);
+      }
    }
 }
 
index d073d665ffb0c82d2ea74ed18bd7f20d72af0aaf..e08c2969e06a7bcf88b9b37d2d337ce9b46792d8 100644 (file)
@@ -78,6 +78,7 @@ static const struct debug_control debug_control[] = {
    { "tcs",         DEBUG_TCS },
    { "ds",          DEBUG_TES },
    { "tes",         DEBUG_TES },
+   { "l3",          DEBUG_L3 },
    { NULL,    0 }
 };
 
index 175ac68a7c8cdc132b63886c3a11c6e1d09c3223..b7b51112d9244ede5c7e8eddd71381e80e7ade45 100644 (file)
@@ -71,6 +71,7 @@ extern uint64_t INTEL_DEBUG;
 #define DEBUG_NO_COMPACTION       (1ull << 35)
 #define DEBUG_TCS                 (1ull << 36)
 #define DEBUG_TES                 (1ull << 37)
+#define DEBUG_L3                  (1ull << 38)
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "INTEL-MESA"