On Tue, Dec 10, 2019 at 5:09 AM Michael Jackson <mike.jack...@bluequartz.net> wrote:
> What did you use to collect the sampling data? Our project also > experiences long build times (30 minutes on a 12 Core Xeon machine) using > Qt5. I would like to be able to zero in on some of the issues instead of > guessing at them. > > > I use UIforETW (https://github.com/google/UIforETW/releases) to collect the traces. This is a powerful but relatively simple user interface for Microsoft's ETW (event tracing for Windows). Bruce Dawson, the author, works for Google on the Chrome Browser and therefore UIforETW has a lot of Chrome specific options, but you can ignore all of those and use it for tracing any application. Collecting the traces is pretty simple, but analyzing them in WPA (Windows Performance Analyzer) is not because there is just an immense amount of data and so many options for analyzing it. I recommend that you start by reading this blog post: https://randomascii.wordpress.com/2015/09/01/xperf-basics-recording-a-trace-the-ultimate-easy-way/. He also has several videos that cover some important analysis topics at https://randomascii.wordpress.com/2014/08/19/etw-training-videos-available-now/, but they're behind a paywall. When I first started using the tool there was a free trial subscription of some sort that I signed up for so that I could view the videos. After that, reading his ETW related blog posts is very informative. He runs into some very strange performance problems, but the analysis techniques he discusses have been useful to me in tracking down less obscure problems in our application. The post at https://randomascii.wordpress.com/2019/10/20/63-cores-blocked-by-seven-instructions/ is even compiling related. I was excited when I saw that post since it's a similar problem to what I'm running into with moc but the sources of the problems are different. For Windows minifilter driver problems, which is what I think I'm dealing with here, I found a blog post at https://blogs.msdn.microsoft.com/ntdebugging/2012/05/31/hotfix-to-enable-mini-filter-performance-diagnostics-with-xperf-for-windows-server-2008r2/ that discusses how to collect trace information on minifilter delays. Instead of using the command line tool described there, I used UIforETW's Settings dialog and added the flags given in the blog post to the Extra Kernel Flags and Extra Kernel Stackwalk settings. If you want to profile anything Qt related, you'll need the PDB symbols for the libraries and the tools. We use our own build of Qt 5.12, so we have all of the symbols available, EXCEPT that I can't figure out how to generate PDB files for qmake.exe itself, so I've been unable to analyze why qmake takes longer to run than it seems to me it should. If anyone knows how to force generation of PDB files for qmake, that would be really helpful. Adam
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest