Skip to content

panfrost: Add debug option for disk cache stats

Alyssa Rosenzweig requested to merge alyssa/mesa:panfrost/disk-cache-stats into main
If the maximum size of the disk cache is too small, Mesa must either evict
cached shaders or refuse to cache further shaders. Especially on platforms with
fast disk access but slow CPUs, where the disk cache is especially important,
that maximum disk cache size can cause a performance cliff that can be hard to
diagnose. This patch adds a debug option that allows system integrators to dump
the disk cache hit/miss rate.

To use, set the PAN_MESA_DEBUG=cache_stats environment variable. Statistics will
printed to standard output when the screen is destroyed. This requires the
application to be closed gracefully. This matches llvmpipe's implementation.

Merge request reports