Debugging GCC Compile Times

This question already has an answer here:

  • Profiling the C++ compilation process 5 answers

  • g++ some_file.cc -ftime-report

    will give you a rough estimate of time spent in different compiler phase. Most important ones in your case are name lookup and parsing.

    No way to get a per class/function compile time alas.

    STeven Watanabe has proposed a template profiler , available in boost sandbox that helps getting the number of potential instantiation of anything in a .cc


    I know that it's not what you're looking for, but maybe ccache/distcc may help to speed up compilation.

    Also if you have multi core machine you may exploit make -jN to tell make run N jobs at once.

    Don't forget about precompiled headers too.

    链接地址: http://www.djcxy.com/p/85834.html

    上一篇: 轻量级asyncio网络服务器

    下一篇: 调试GCC编译时间