<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 31, 2017, at 10:57 AM, Matthias Braun via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Last time I measured 0.5%-1% slowdown with statistics enabled in a release build. Also see my last thread about this: <a href="https://groups.google.com/forum/#!topic/llvm-dev/xZVBNg5bsSk" class="">https://groups.google.com/forum/#!topic/llvm-dev/xZVBNg5bsSk</a></div><div class="">We also had plans to push statistics (probably newly introduced one rather than retrofitting the existing ones) through the optimization remark system to allow some context like per-function statistics. But there is nothing concrete yet.</div></div></div></blockquote><div><br class=""></div><div>And just to elaborate, this originated form the observation that there are many cases where we issue a debug message, emit an optimization remark and also increment a statistic within a few lines of code. Having a single way of feeding all these use cases would be nice code-readability and usability improvement.</div><div><br class=""></div><div>Adam</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">- Matthias</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 31, 2017, at 7:39 AM, Daniel Berlin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Right now, the LLVM Statistic class does not increment values if we are in non-debug mode, unless you define LLVM_ENABLE_STATS (which, sadly, is also not available from cmake).<div class=""><br class=""></div><div class="">Before i go and add it to cmake, i ran numbers.</div><div class=""><br class=""></div><div class="">I can't find a single testcase, large or small, where enabling statistics all the time isn't completely noise.</div><div class=""><br class=""></div><div class="">It looks like it was disabled in march 2013.</div><div class=""><a href="https://reviews.llvm.org/D486" class="">https://reviews.llvm.org/D486</a><br class=""></div><div class=""><br class=""></div><div class="">The only discussion i can find in the same time period is around fastisel using a lot of per-instruction stats, and it causing some slow-down.</div><div class=""><br class=""></div><div class="">However, I can't find any actual data/testcases in this discussion at all, and disabling stats globally is actually fairly annoying for performance work.</div><div class="">:(</div><div class=""><br class=""></div><div class="">Does anyone have any testcases where it is actually slow that i can look at?<br class=""><br class=""></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class=""></div></blockquote></div><br class=""></div>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>