From: Eric Anholt Date: Thu, 12 Jul 2012 21:05:29 +0000 (-0700) Subject: i965: Add performance debug for when the state cache gets nuked. X-Git-Tag: accepted/2.0alpha-wayland/20121114.171706~650 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97a5f0ff2eb3a6e8b303ce402a4e1d9be7e7b323;p=profile%2Fivi%2Fmesa.git i965: Add performance debug for when the state cache gets nuked. Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index 4ae8e12..57a5ee9 100644 --- a/src/mesa/drivers/dri/i965/brw_state_cache.c +++ b/src/mesa/drivers/dri/i965/brw_state_cache.c @@ -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); + } }