[Mesa-dev] [PATCH 0/3] mesa: delayed initialization of performance monitor groups
Nicolai Hähnle
nhaehnle at gmail.com
Wed Nov 25 04:00:18 PST 2015
Hi,
since performance monitors are almost never used, we want to avoid the startup
cost associated with setting up the group information. This mostly affects
Gallium, where that initialization is rather inefficient right now.
For radeonsi with my performance counter series, the first two patches shave
off almost 200ms from the time taken by glxinfo. The last patch is a smaller
win on top for radeon only (harder to measure, in the single-digit ms range at
most). (The remaining overhead for radeonsi in enabling performance counters
vs. not doing so when unused is not measurable with a naive use of `time`
on the command line.)
The 200ms are actually largely caused by the fact that the state tracker
queries the driver very rather inefficiently, with the time of initialization
being proportional to # groups * # driver queries rather than proportional to
# driver queries (and then, inside of that, yet another inefficiency in
the radeon driver). It would certainly be nice to improve that as well,
but even with such an improvement, it's time we don't need to spend in the
vast majority of cases, hence the approach I've taken in these patches.
Please review!
Thanks,
Nicolai
More information about the mesa-dev
mailing list