DescriptionI'm adding this because I would like to use it to profile clang over large project builds. My plan is to thread -ftime-report through the build system and write a script to aggregate the output.
Output looks like this for a hello world test case:
$ Debug/bin/clang -ftime-report t.c -c -o t.o
...
===-------------------------------------------------------------------------===
Compilation phase timers
===-------------------------------------------------------------------------===
Total Execution Time: 0.0360 seconds (0.0497 wall clock)
---User Time--- --User+System-- ---Wall Time--- --- Name ---
0.0160 ( 44.4%) 0.0160 ( 44.4%) 0.0198 ( 39.8%) Parsing and Sema Time
0.0120 ( 33.3%) 0.0120 ( 33.3%) 0.0187 ( 37.6%) Lexing and Preprocessing Time
0.0040 ( 11.1%) 0.0040 ( 11.1%) 0.0071 ( 14.4%) Machine Code Generation Time
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0029 ( 5.8%) LLVM IR Generation Time
0.0040 ( 11.1%) 0.0040 ( 11.1%) 0.0012 ( 2.5%) LLVM IR Optimization Time
0.0360 (100.0%) 0.0360 (100.0%) 0.0497 (100.0%) Total
Patch Set 1 #
MessagesTotal messages: 3
|