[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-commits
Subject:    Re: [llvm] r176214 - The FastISEL should be fast. But when we record statistics we use atomic operat
From:       Eric Christopher <echristo () gmail ! com>
Date:       2013-02-28 21:26:17
Message-ID: CALehDX63cfZ1j8HYE052Rj8wi_CyGME4qrWw0hEvL5kdLzRgZQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Feb 28, 2013 at 1:15 PM, Eli Bendersky <eliben@google.com> wrote:

> >> > It's why I was asking, I think it might be an interesting idea to put
> >> > all
> >> > the statistics
> >> > behind NDEBUG so we can feel free to collect stats whenever rather
> than
> >> > needing to worry about putting the high firing status under NDEBUG
> >> > explicitly.
> >>
> >> FWIW, I'm +1 on this. You'll still have to wrap the actual ++counter
> >> code with DEBUG or some other macro-fu all over the code, though.
> >>
> >> Eil
> >
> >
> >
> > Perhaps we could just re-define the operator++(), operator--(), etc. in
> > Statistics.h to only do real work "#if !defined(NDEBUG) ||
> > defined(LLVM_ENABLE_STATS)", and to be nops otherwise.  Where
> > LLVM_ENABLE_STATS would be like LLVM_ENABLE_DUMP...   If that sounds
> > reasonable, I could spin up a patch.
>
> +1. I like the idea of also having LLVM_ENABLE_STATS, so that if
> anyone for some reason wants these stats for a release build, that
> becomes possible too.
>

Agreed.

-eric

[Attachment #5 (text/html)]

<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">&lt;<a \
href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div class="im">&gt;&gt; &gt; It&#39;s why I was asking, \
I think it might be an interesting idea to put<br> &gt;&gt; &gt; all<br>
&gt;&gt; &gt; the statistics<br>
&gt;&gt; &gt; behind NDEBUG so we can feel free to collect stats whenever rather \
than<br> &gt;&gt; &gt; needing to worry about putting the high firing status under \
NDEBUG<br> &gt;&gt; &gt; explicitly.<br>
&gt;&gt;<br>
&gt;&gt; FWIW, I&#39;m +1 on this. You&#39;ll still have to wrap the actual \
++counter<br> &gt;&gt; code with DEBUG or some other macro-fu all over the code, \
though.<br> &gt;&gt;<br>
&gt;&gt; Eil<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Perhaps we could just re-define the operator++(), operator--(), etc. in<br>
&gt; Statistics.h to only do real work &quot;#if !defined(NDEBUG) ||<br>
&gt; defined(LLVM_ENABLE_STATS)&quot;, and to be nops otherwise.  Where<br>
&gt; LLVM_ENABLE_STATS would be like LLVM_ENABLE_DUMP...   If that sounds<br>
&gt; 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>



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic