现在的位置: 首页 > 综合 > 正文

如何对VC的dll进行profile

2013年05月16日 ⁄ 综合 ⁄ 共 785字 ⁄ 字号 评论关闭

 

如何profile一个dll呢?

有以下步骤。

 

1.) Delete the export (<lib>.exp) and lib file (<lib>.lib) for the library you want to check

 

2.) Tick in the settings dialog on the tab-page the checkbox "Enable profiling" 

 

3.) Tick on the same tab-page the checkbox "Generate mapfile" and change the output path for the map file to "o:/bin/..."

 

4.) Build the library with the new linker settings

 

5.) Open a command shell and change to the "O:/bin" folder.

 

6.) Call the following batch with the name of the Library (without extension). If you want to run a different application than change the batch file.

 

Warnings can be ignored ...

 

PRODLL.BAT

COPY %1.dll %1.save

PREP /OM %1.dll

COPY %1._ll %1.dll

PROFILE /I %1 /O %1 k:/wiski/wiski7.exe

COPY %1.save %1.dll

PREP /M %1

PLIST %1 >%1.txt

notepad %1.txt

 

7.) Call the functions you want to check in your application

 

8.) Close your application

 

9.) Notepad will pop up with the result file after in a moment

 

 

抱歉!评论已关闭.