-qphsinfo (-ftime 报告)
适用的调用
选项 | xlc (编译 C) | xlC (编译 C++) | xlclang(编译 C) | xlclang++(编译 C++) |
---|---|---|---|---|
-qphsinfo | ✓ | ✓ | ✓ | ✓ |
-ftime-report | ✓ | ✓ |
注: 此表中仅列出典型调用。 对于所有基本调用及其等效特殊调用,您可以参阅 编译器调用的完整列表 。
类别
等效编译指示
无。
用途
报告每个编译阶段用于标准输出的时间。
语法
缺省值
缺省情况下, -ftime-report 未开启。
-qnophsinfo
使用量
对于每个阶段,输出采用 number1/number2 格式,其中 number1 表示编译器使用的 CPU 时间, number2 表示 实时 (挂钟时间)。
-qphsinfo
报告的时间以秒为单位。
预定义的宏
无。
示例
要编译 并报告编译每个阶段所花费的时间,请输入以下命令:
myprogram.c
xlc myprogram.c -qphsinfo
输出将类似于:
C Init - Phase Ends; 0.010/ 0.040
IL Gen - Phase Ends; 0.040/ 0.070
W-TRANS - Phase Ends; 0.000/ 0.010
OPTIMIZ - Phase Ends; 0.000/ 0.000
REGALLO - Phase Ends; 0.000/ 0.000
AS - Phase Ends; 0.000/ 0.000
使用 -O4 编译同一程序将提供:
C Init - Phase Ends; 0.010/ 0.040
IL Gen - Phase Ends; 0.060/ 0.070
IPA - Phase Ends; 0.060/ 0.070
IPA - Phase Ends; 0.070/ 0.110
W-TRANS - Phase Ends; 0.060/ 0.180
OPTIMIZ - Phase Ends; 0.010/ 0.010
REGALLO - Phase Ends; 0.010/ 0.020
AS - Phase Ends; 0.000/ 0.000

myprogram.C
xlc++ myprogram.C -qphsinfo
输出将类似于:
Front End - Phase Ends; 0.004/ 0.005
W-TRANS - Phase Ends; 0.010/ 0.010
OPTIMIZ - Phase Ends; 0.000/ 0.000
REGALLO - Phase Ends; 0.000/ 0.000
AS - Phase Ends; 0.000/ 0.000
使用 -O4 编译同一程序将提供:
Front End - Phase Ends; 0.004/ 0.006
IPA - Phase Ends; 0.040/ 0.040
IPA - Phase Ends; 0.220/ 0.280
W-TRANS - Phase Ends; 0.030/ 0.110
OPTIMIZ - Phase Ends; 0.030/ 0.030
REGALLO - Phase Ends; 0.010/ 0.050
AS - Phase Ends; 0.000/ 0.000