码迷,mamicode.com
首页 > 其他好文 > 详细

Qcom rampdump解析工具使用

时间:2019-06-06 19:33:05      阅读:371      评论:0      收藏:0      [点我收藏+]

标签:pat   ddr   gnu   logging   queue   oid   gcc   tar   run   

使用如下命令获取qcom工具:

ljj@ljj-ThinkCentre-M83:~/git/qcom_tools/ramdump$ git clone git://codeaurora.org/quic/la/platform/vendor/qcom-opensource/tools
正克隆到 ‘tools‘...
remote: Counting objects: 7400, done.
remote: Compressing objects: 100% (550/550), done.
remote: Total 7400 (delta 315), reused 0 (delta 0)
接收对象中: 100% (7400/7400), 1.18 MiB | 0 bytes/s, 完成.
处理 delta 中: 100% (5365/5365), 完成.
检查连接... 完成。

  

 

将如下内容保存成shell脚本至/home/ljj/shared/tools/ 路径下,加入环境变量(~/.bashrc中,加入一行:export PATH=/home/ljj/shared/tools/:$PATH)。(其中force-hardware sdm845,可以根据平台不同修改命令)。

中间文件的路径是在code源码路径下(这个是64位的,32位的现在还有平台用么?):

gdb:prebuilts/gdb/linux-x86/bin

nm:prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin

objdump:prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin

# ramdump-parser.sh
 
#! /bin/bash
echo ""
echo "Start ramdump parser.."
 
local_path=$PWD
ramdump=$local_path/
vmlinux=$local_path/vmlinux
out=$local_path/out
 
gdb=/media/ljj/2T/IME/prebuilts/gdb/linux-x86/bin/gdb
nm=~/tools/gnu-tools/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm
objdump=~/tools/gnu-tools/aarch64-linux-android-4.9/bin/aarch64-linux-android-objdump
 
# git clone git://codeaurora.org/quic/la/platform/vendor/qcom-opensource/tools
ramparse_dir=~/git/qcom_tools/ramdump/tools-2/tools/linux-ramdump-parser-v2
########################################################################################
 
echo "cd $ramparse_dir"
cd $ramparse_dir
echo ""
 
echo -e "python ramparse.py -v $vmlinux -g $gdb  -n $nm  -j $objdump -a $ramdump -o $out -x"
#echo -e "python ramparse.py -v $vmlinux  -n $nm  -j $objdump -a $ramdump -o $out -x"
echo ""
 
# python 2.7.5
#python ramparse.py -v $vmlinux -g $gdb  -n $nm  -j $objdump -a $ramdump -o $out -x 
python ramparse.py --v $vmlinux -g $gdb  -n $nm  -j $objdump -a $ramdump -o $out -x --force-hardware sdm845 
#python ramparse.py -v $vmlinux  -n $nm  -j $objdump -a $ramdump -o $out -x
 
cd $local_path
echo "out: $out"
echo ""
exit 0

  

另外,针对sdm845平台的解析脚本,一定要创建一个local_settings.py,在ramparse.py同一级目录下。因为脚本中会import,避免报错(这个里面其实可以随便写,因为它也是为了提供gdb等工具的路径变量的)

gdb64_path = "gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-gdb"
nm64_path = "gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm"
objdump64_path = "gcc/linux-x86/aarch64/aarch64-linux-android4.9/bin/aarch64-linux-android-objdump"

‘‘‘
gdb_path - absolute path to the gdb tool for the ramdumps
nm_path - absolute path to the gdb tool for the ramdumps
gdb64_path - absolute path to the 64-bit gdb tool for the ramdumps
nm64_path - absolute path to the 64-bit nm tool for the ramdumps
‘‘‘

 

将vmlinux放到 ramdump文件夹内,然后在ramdump文件的目录下执行命令:

ljj@ljj-ThinkCentre-M83:~/shared/#504/ramdump$ ramdunmp-parser.sh 

Start ramdump parser..
cd /home/ljj/git/qcom_tools/ramdump/tools-2/tools/linux-ramdump-parser-v2

python ramparse.py -v /home/ljj/shared/#504/ramdump/vmlinux -g /media/ljj/2T/IME/prebuilts/gdb/linux-x86/bin/gdb  -n /home/ljj/tools/gnu-tools/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm  -j /home/ljj/tools/gnu-tools/aarch64-linux-android-4.9/bin/aarch64-linux-android-objdump -a /home/ljj/shared/#504/ramdump/ -o /home/ljj/shared/#504/ramdump/out -x


    [1/41] --sched-info ... 0.061917s
    [2/41] --cbmem ... 0.059544s
    [3/41] --clock-dump ... 1.400513s
    [4/41] --cpr3-info ... NOTE: ‘kryo_regulator_list‘ list not found to extract kryo_addr information
0.053601s
    [5/41] --cpr-info ... 0.027354s
    [6/41] --cpu-state ... 0.032388s
    [7/41] --ddr-compare ... 0.376673s
    [8/41] --check-for-watchdog ... 0.018749s
    [9/41] --watchdog ... 1.275302s
    [10/41] --parse-debug-image ... FAILED! 18.466207s
    [11/41] --dmesg ... 0.460676s
    [12/41] --print-iommu-pg-tables ... 0.097094s
    [13/41] --print-ipc-logging ... 309.866953s
    [14/41] --print-irqs ... 0.917176s
    [15/41] --print-kconfig ... 0.002269s
    [16/41] --l1-compare ... FAILED! 0.000342s
    [17/41] --lpm ... 1.697760s
    [18/41] --print-mdpinfo ... FAILED! 0.759938s
    [19/41] --print-memstat ... 2.761667s
    [20/41] --print-memory-info ... 0.456092s
    [21/41] --mmcdoctor ... 1.219992s
    [22/41] --dump-page-tables ... 0.000102s
    [23/41] --print-pagealloccorruption ... 0.000795s
    [24/41] --print-pagetracking ... 0.058347s
    [25/41] --print-pagetypeinfo ... 0.374384s
    [26/41] --pstore ... 0.593554s
    [27/41] --print-reserved-mem ... 0.063802s
    [28/41] --print-cma-areas ... 25.059915s
    [29/41] --print-softirq-stat ... 0.056983s
    [30/41] --check-rodata ... FAILED! 0.082407s
    [31/41] --print-rtb ... 3.223726s
    [32/41] --print-runqueues ... 1.166328s
    [33/41] --spm ... FAILED! 0.057651s
    [34/41] --print-tasks ... 0.541873s
    [35/41] --print-tasks-timestamps ... 0.323309s
    [36/41] --check-for-panic ... 0.014723s
    [37/41] --thermal-info ... 0.293565s
    [38/41] --timer-list ... 0.833970s
    [39/41] --print-vmalloc ... 1.159435s
    [40/41] --print-vmstats ... 0.667759s
    [41/41] --print-workqueues ... 0.455242s

out: /home/ljj/shared/#504/ramdump/out

 

可以在目录下找到out文件夹,其中就是解析出来的文件。

然后接下来才是最痛苦的,泡杯茶,吃颗糖,慢慢看吧~ XD

 

Qcom rampdump解析工具使用

标签:pat   ddr   gnu   logging   queue   oid   gcc   tar   run   

原文地址:https://www.cnblogs.com/lingjiajun/p/10985135.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!