<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 1:15 PM, Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">>> > It's why I was asking, I think it might be an interesting idea to put<br>
>> > all<br>
>> > the statistics<br>
>> > behind NDEBUG so we can feel free to collect stats whenever rather than<br>
>> > needing to worry about putting the high firing status under NDEBUG<br>
>> > explicitly.<br>
>><br>
>> FWIW, I'm +1 on this. You'll still have to wrap the actual ++counter<br>
>> code with DEBUG or some other macro-fu all over the code, though.<br>
>><br>
>> Eil<br>
><br>
><br>
><br>
> Perhaps we could just re-define the operator++(), operator--(), etc. in<br>
> Statistics.h to only do real work "#if !defined(NDEBUG) ||<br>
> defined(LLVM_ENABLE_STATS)", and to be nops otherwise.  Where<br>
> LLVM_ENABLE_STATS would be like LLVM_ENABLE_DUMP...   If that sounds<br>
> reasonable, I could spin up a patch.<br>
<br>
</div>+1. I like the idea of also having LLVM_ENABLE_STATS, so that if<br>
anyone for some reason wants these stats for a release build, that<br>
becomes possible too.<br></blockquote><div><br></div><div style>Agreed.</div><div style><br></div><div style>-eric </div></div></div></div>