expose DR statistics to clients
One driving use case here is wanting the basic block count to evaluate things like code cache pre-population (xref #2463 (closed)).
We have dr_stats.h exposed from core/ but it's only used for things built inside the DR repo: namely, libutil/, linked into the DRstats Windows stats viewer. dr_stats.h is not exposed publicly for client use. Doing so would mean it's frozen and we couldn't add stats in the middle anymore. It's also full of low-level internal DR impl stuff: not really great for public consumption.
It seems we have two choices:
-
Make dr_stats.h public, but mark it as non-binary-compatible, subject to change between releases, and full of perhaps hard-to-understand internal stats.
-
Selectively expose a handful of high-level stats by copying to some new struct we define in the main client API.