内存泄露

http://biowallet.blogspot.com/2009/04/analyze-android-memory-dump-with.html

 http://yueguc.javaeye.com/blog/788811

 

1.下载MAT

2。反复操作case(可参考下面)

3.

kill -10 <pid number>



4.



hprof-conv android-dump.hprof standard-dump.hprof



5.MAT 打开。



http://www.ophonesdn.com/article/show/277









Part 1: Tool Installation







1> Go to my shared folder //w4972c-02/beihai_ata_mrc_only


, copy all items into your local PC, suggest to save them in C:/.



















2> Connect you test phone with PC via usb cable, select debugging mode.







3> Had better ensure adb command can be send to test phone correctly, then







4> Dubole click "1_Install_tools_oms_product_.
bat" to install ATA & MrC tools into test phone in "/data" directory.

5> Dubole click "3_1_Setup_ATA_Snappertd_32I.bat" to setup ATA tool.

6> Power cycle the test phone.

After execute above steps, the 2 tools will be installed correctly.

Part2: MrC usage.

a) Start MrC
1> adb shell
2> #cd data
3> #./android_mrc &     (note: there is a blank before &)

    Then you can do your case, after done the case, then

b) Get MrC log
1> adb pull /data/_mrc_auto/memruntimeinfo.csv c:/ (or your specific folder)

    If want to generate a chart for the memorized process, pls refer to attached guide for MrC.

Part3: ATA usege

a) Start ATA tool
1>adb shell
2>#cd data
3>#ataagent (note: this step is to start ATA tool, if see below info that is to say ATA has been started successfully)
----atahandle::currentpara=372
Result: Parcel(00000000 00000001   '........')
There has Logcial Capture!
ATA agent has started!
    Otherwise, pls do "ps" command to find all processes' PID, if you can find the process "/data/ataagent" or "ataagent", that is to say the ATA tool has been started already. If you can not find, wait for a while, then re-start ATA tool again.

b) Record script & stop
1>#ataagent record /data/MusicPlaying.txt (note: "/data/c9/MusicPlaying.txt" is the script's directory and name, you can specify the location you like)
2>#ataagent stop

c) Run script & stop
1>#ataagent playback /data/MusicPlaying.txt
2>#ataagent stopplay

d) Run a list & stop
If you want to run a script many time, pls add the script a the list file, a list file is like below:

#start
/data/1.txt,100
#end


Only replacing the script (red part) by the script you want to run and specifying the loop time you like (at blue part) is ok.

then push the list.lst file into "/data" folder, and run it like below:
1>#ataagent playback /data/list.lst
2)#ataagent stopplay (note: stop the list)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值