summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell/spu/spu_dcache.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-04-01 11:05:32 -0600
committerBrian <[email protected]>2008-04-01 11:05:32 -0600
commitf8c09464f801e97b24ccdb1ba70444c60d4235bd (patch)
tree8d52683b333960d76fa168a357200072554371af /src/gallium/drivers/cell/spu/spu_dcache.c
parentf3a62372bf155d14876f98b1a085841607bb344c (diff)
cell: enable #define CACHE_STATS to print a cache report upon exit
Diffstat (limited to 'src/gallium/drivers/cell/spu/spu_dcache.c')
-rw-r--r--src/gallium/drivers/cell/spu/spu_dcache.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_dcache.c b/src/gallium/drivers/cell/spu/spu_dcache.c
index a1701d80d18..167404cdc54 100644
--- a/src/gallium/drivers/cell/spu/spu_dcache.c
+++ b/src/gallium/drivers/cell/spu/spu_dcache.c
@@ -36,6 +36,7 @@
#define CACHE_SET_TAGID(set) (((set) & 0x03) + TAG_DCACHE0)
#define CACHE_LOG2NNWAY 2
#define CACHE_LOG2NSETS 6
+/*#define CACHE_STATS 1*/
#include <cache-api.h>
/* Yes folks, this is ugly.
@@ -123,3 +124,20 @@ spu_dcache_mark_dirty(unsigned ea, unsigned size)
? (entry & ~CACHELINE_VALID) : entry;
}
}
+
+
+/**
+ * Print cache utilization report
+ */
+void
+spu_dcache_report(void)
+{
+#ifdef CACHE_STATS
+ if (spu.init.id == 0) {
+ printf("SPU 0: Texture cache report:\n");
+ cache_pr_stats(data);
+ }
+#endif
+}
+
+