如何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
责任编辑:小草