i965: Add performance debug for when the state cache gets nuked.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2012-07-12 14:05:29 -07:00
parent fc3b7c9b56
commit 97a5f0ff2e
1 changed files with 4 additions and 1 deletions

View 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);
}
}