c++ g++ llvm-clang 编译器分析
问题描述
请注意,我的问题不是:我如何告诉我的编译器在开启分析的情况下进行编译.
Note, my question is not: how do I tell my compiler to compile with profiling on.
我想配置我的编译过程.对于每个文件,我想知道程序的每一行花费了多少时间.
I want to profile my compiles process. For each file, I'd like to know how much time is spent on each line of the program.
我正在处理一个项目,有些文件的编译时间很长,我正在尝试找出原因.
I'm working on a project, some files have huge compile times, I'm trying to figure out why.
有没有办法用 g++ 或 llvm-clang 做到这一点?
Is there anyway to do this with g++ or llvm-clang?
谢谢!
-v -ftime-report 的输出(什么意思)?
Output of -v -ftime-report (what oes it mean)?
下面是解析器"还是扩展"模板的使用?
In the following, is "parser" or "expand" the use of templates?
推荐答案
用 g++ 试试这些命令行选项
Try these command line options with g++
-v -ftime-报告
-v -ftime-report
这应该会为您提供有关编译过程的更多信息.罪魁祸首通常是模板.
That should give you more information on the compiling process. The culprit is usually templates though.
这篇关于c++ g++ llvm-clang 编译器分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!