I slightly modified the Kaleidoscope example to print the timing data using the NamedRegionTimer as below: // Run the main "interpreter loop" now. { const char *GroupName = "MainLoop"; NamedRegionTimer T("Kaleidoscope", GroupName, true); MainLoop(); } My assumption was that when T goes out of scope, it will emit the data on the command line. But I see nothing. How does NamedRegionTimer work ? - sanjiv -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110509/38f3afa0/attachment.html>
ping. On Mon, May 9, 2011 at 10:20 PM, Sanjiv <llvmdev at gmail.com> wrote:> I slightly modified the Kaleidoscope example to print the timing data using > the NamedRegionTimer as below: > > // Run the main "interpreter loop" now. > { > const char *GroupName = "MainLoop"; > NamedRegionTimer T("Kaleidoscope", GroupName, true); > MainLoop(); > } > > My assumption was that when T goes out of scope, it will emit the data on > the command line. But I see nothing. > How does NamedRegionTimer work ? > > - sanjiv >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110510/7251b05f/attachment.html>
Hi Sanjiv,> On Mon, May 9, 2011 at 10:20 PM, Sanjiv <llvmdev at gmail.com > <mailto:llvmdev at gmail.com>> wrote: > > I slightly modified the Kaleidoscope example to print the timing data using > the NamedRegionTimer as below: > > // Run the main "interpreter loop" now. > { > const char *GroupName = "MainLoop"; > NamedRegionTimer T("Kaleidoscope", GroupName, true); > MainLoop(); > } > > My assumption was that when T goes out of scope, it will emit the data on > the command line. But I see nothing. > How does NamedRegionTimer work ?I think you only get output if you run with the -time-passes option. Also, I think info is only output when the program exits, not immediately. Ciao, Duncan.