如何对VC的dll进行profile

本文详细介绍了一种用于性能剖析DLL文件的方法。通过九个步骤指导读者完成整个过程:删除导出文件和库文件、启用配置文件设置、生成映射文件、构建库、运行批处理文件、调用所需功能、关闭应用程序并查看结果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

如何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

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值