i965: Add performance debug for when the state cache gets nuked.
authorEric Anholt <eric@anholt.net>
Thu, 12 Jul 2012 21:05:29 +0000 (14:05 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 13 Aug 2012 02:08:25 +0000 (19:08 -0700)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_state_cache.c

index 4ae8e1212ff9dc5de5bc41b3e84de11ccb7f9841..57a5ee9b4132fcd2162049f6769ffe61365feed4 100644 (file)
@@ -375,8 +375,11 @@ brw_state_cache_check_size(struct brw_context *brw)
    /* un-tuned guess.  Each object is generally a page, so 1000 of them is 4 MB of
     * state cache.
     */
-   if (brw->cache.n_items > 1000)
+   if (brw->cache.n_items > 1000) {
+      perf_debug("Exceeded state cache size limit.  Clearing the set "
+                 "of compiled programs, which will trigger recompiles\n");
       brw_clear_cache(brw, &brw->cache);
+   }
 }