HoppeRx - the cure for your ailing device

本文详细介绍了如何使用AppVerifier工具来监控Windows Mobile设备上开机时加载的进程,包括安装配置步骤、环境变量设置及查找内存泄漏的方法。

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

How to setup AppVerifier for "Always running" processes

AppVerifier is a very useful tool when it comes to finding memory leaks. It is relatively easy to configure if you have some understanding of how AKU's and PB work. There are pretty comprehensive instructions on MSDN found here. However if you need to use AppVerifier on something that loads during boot time, you need to perform extra steps that are harder to find. The purpose of this article is to explain in a greater detail what you need to do to setup AppVerifier for processes that load at boot time.

Here are simple steps that you need to follow to make AppVerifier work for "Always Running" processes:

1. Install Platform Builder (tools only install is enough because CETK is included with that install), install AKU if you haven't already
2. Open your AKU build window where you build images
3. (Optional) Removed/reset all the security or make sure it's configured properly
4. Copy all the AppVerifier binaries to your %_FLATRELEASEDIR% by running getappverif_cetk.bat from your wcetk directory. 

a. Default is "c:/Program Files/Platform Builder for Windows Mobile/5.00/CEPB/wcetk/DDTK/DESKTOP/getappverif_cetk.bat"
b. Or copy them manually. Here is the list of files needed (AppVerif* shim_*.dll symhlp.dll vlog.dll lmemdebug_autoshim.dll shimeng.dll)
5. Set the environment variables for the modules that need to be shimmed in our case device.exe and the OEM dlls that you want to check
a. Run SET VERIFY_MODULES=device.exe <list the rest of your dlls and exes delimited by spaces>. For example: SET VERIFY_MODULE=device.exe atidrv.dll
6. Set IMGSHIMENABLE=1 if you have set IMGPERSISTENTSTORAGE=1
7. Set VERIFY_OPTIONS=EnableFanOut (read more about options later ion the article)
8. Run makeverifyfile.bat from your WCETK directory (default is at "c:/Program Files/Platform Builder for Windows Mobile/5.00/CEPB/wcetk/DDTK/DESKTOP/makeverifyfile.bat")
9. Run makeimg.exe
10. Make sure that all shim dlls got signed properly
11. Flash the image on to the device
12. Connect the device to KITL and boot it (you don't need KITL but it's much more convenient to have it)
13. To make sure that KITL is connected you should see things like
a. TID:<address> ++Shim autoloader
b. Found shim 'shim_heap.dll'
c. And so on
14. Unfortunately there is no magic bullet that would just show all the memory leaks. The best way to find a leak is to get a snapshot then run user scenarios then get a delta. Here is an example of what can be done:
a. Boot the device
b. Run 'heapverif device.exe chk' (this will create a check point on device.exe)
d. Run 'heapverif device.exe delta' (this will report the potential leaks since the last check point on device.exe)
e. Repeat these steps to find all the leaks

Obtaining the log file

If you are connected with KITL the log file with AppVerifier information can be found in your release directory it should be called something like this
AppVerifier_<ProcessName>_<ProcessIdentifier>.log older versions of AppVerifier might call it VerifierLog_<AppName_<ProcessIdentifier>.log

Published Tuesday, September 26, 2006 12:49 AM by deanmel
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值