Question about DebugCounter info print out


I am now working on transformation level bisecting using DebugCounter.

I have a patch which lets us keep track of the total counts of DebugCounter:

I am wondering what is the best way to expose them from opt or clang.
I was thinking of writing a pass to print the total counts of DebugCounter
out, but since I am not familiar with this workflow, I am wondering if it is
a proper way to do it.

Thoughts appreciated.