Profile经常被用来做性能调优
设置:
要用IDE来做Profile,以VS6为例
Project-Setting-Link选项卡
勾选Enable profiling
使用:
Build-Profile,选择关注的类型,然后点OK自动运行起程序
如果出现 PREP : fatal error PRF1011: cannot open file xxx.map 之类,看看是不是工程设置没生成map文件或者生成路径不是PREP工具所预期的输入位置
待程序结束后就会就会在Output窗口的Profile子窗口输出统计结果
默认Profile会生成pbi和pbt两个文件
If a value for the PREP environment variable is not specified, the default options for PREP are:
/FT /OI filename /OT filename
where filename is set to the programname1 parameter value.
将结果输出到文件:
PLIST.EXE位于 Microsoft Visual Studio\VC98\Bin\下
其他疑难:
fatal error PRF1011: cannot open file xxx.pbx,这种错误可能是当前VC的环境设置问题
------
http://topic.csdn.net/t/20030321/17/1560801.html
装了platform sdk后,vc的环境设置里
executables目录里把sdk的bin目录放到了vc的bin目录之前,而sdk和
vc各自有一个profile.exe,在IDE里用sdk的profile.exe会有问题,把
vc的bin目录放到前面就可以了。
-----
设置:
要用IDE来做Profile,以VS6为例
Project-Setting-Link选项卡
勾选Enable profiling
使用:
Build-Profile,选择关注的类型,然后点OK自动运行起程序
如果出现 PREP : fatal error PRF1011: cannot open file xxx.map 之类,看看是不是工程设置没生成map文件或者生成路径不是PREP工具所预期的输入位置
待程序结束后就会就会在Output窗口的Profile子窗口输出统计结果
默认Profile会生成pbi和pbt两个文件
If a value for the PREP environment variable is not specified, the default options for PREP are:
/FT /OI filename /OT filename
where filename is set to the programname1 parameter value.
将结果输出到文件:
比如不小心被输出窗口给关了,或者输出文件过长,如果希望把Output窗口的profile信息输出到文件,可以使用plist工具
PLIST.EXE位于 Microsoft Visual Studio\VC98\Bin\下
其他疑难:
fatal error PRF1011: cannot open file xxx.pbx,这种错误可能是当前VC的环境设置问题
------
http://topic.csdn.net/t/20030321/17/1560801.html
装了platform sdk后,vc的环境设置里
executables目录里把sdk的bin目录放到了vc的bin目录之前,而sdk和
vc各自有一个profile.exe,在IDE里用sdk的profile.exe会有问题,把
vc的bin目录放到前面就可以了。
-----