[Mesa-dev] [PATCH v2] i965: Issue performance warnings when growing the program cache
Kenneth Graunke
kenneth at whitecape.org
Thu Aug 24 05:06:29 UTC 2017
On Wednesday, August 23, 2017 1:58:32 AM PDT Chris Wilson wrote:
> Quoting Kenneth Graunke (2017-08-22 21:47:54)
> > This involves a bunch of unnecessary copying, a batch flush, and
> > state re-emission.
>
> > ---
> > src/mesa/drivers/dri/i965/brw_program_cache.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
> > index 4dcfd5234df..e9706be8961 100644
> > --- a/src/mesa/drivers/dri/i965/brw_program_cache.c
> > +++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
> > @@ -217,6 +217,9 @@ brw_cache_new_bo(struct brw_cache *cache, uint32_t new_size)
> > struct brw_context *brw = cache->brw;
> > struct brw_bo *new_bo;
> >
> > + perf_debug("Copying to larger program cache: %zu kB -> %u kB\n",
> > + cache->bo->size / 1024, new_size / 1024);
>
> Hmm, z -> size_t but bo->size is uin64_t, so sadly we need "%"PRIu64
> -Chris
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
Right...
I'll just do:
+ perf_debug("Copying to larger program cache: %u kB -> %u kB\n",
+ (unsigned) cache->bo->size / 1024, new_size / 1024);
new_size is already a uint32_t, and we know the existing size is half
of that, so it's not like the extra bits are buying us anything.
--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170823/a154dd5b/attachment.sig>
More information about the mesa-dev
mailing list